Przejdź do treści
Biblioteka skilli
Dane i analityka · Integracja z narzędziem

aidp-oracle-db

/aidp-oracle-db

Odczytuje lub zapisuje bazę Oracle (Compute, Base DB, on-prem, wersje 19c do 26ai bez Autonomous) z notatnika AIDP przez format aidataplatform, z hostem, portem, nazwą bazy i hasłem.

Licencja
UPL-1.0
Ostatnia zmiana repozytorium
26.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

UPL-1.0, otwarta.

Co robi i kiedy

Odczytuje lub zapisuje bazę Oracle (Compute, Base DB, on-prem, wersje 19c do 26ai bez Autonomous) z notatnika AIDP przez format aidataplatform, z hostem, portem, nazwą bazy i hasłem.

Oryginalny opis (EN)

Read or write an Oracle Database (Compute / Base DB / on-prem / Oracle 19c, 21c, 23ai, 26ai non-Autonomous) from an AIDP notebook via the AIDP `aidataplatform` Spark format handler. Use when the user mentions Oracle Database, generic Oracle DB, on-prem Oracle, plain Oracle JDBC, port 1521, non-Autonomous Oracle. Read-write. Auth is host/port + database name + user/password.

Jak działa

  1. When to use
  2. When NOT to use
  3. Prerequisites in the AIDP notebook
  4. Read (inline options)
  5. Write (inline options)
  6. Read via existing external catalog (catalog.id)
  7. Pushdown SQL
  8. External catalog pushdown
  9. Gotchas
  10. References
Sekcje z nagłówków SKILL.md, w oryginale · 154 linii, 602 słów
Podgląd SKILL.md
---
name: aidp-oracle-db
description: Read or write an Oracle Database (Compute / Base DB / on-prem / Oracle 19c, 21c, 23ai, 26ai non-Autonomous) from an AIDP notebook via the AIDP `aidataplatform` Spark format handler. Use when the user mentions Oracle Database, generic Oracle DB, on-prem Oracle, plain Oracle JDBC, port 1521, non-Autonomous Oracle. Read-write. Auth is host/port + database name + user/password.
allowed-tools: Read, Write, Edit, Bash
---

# `aidp-oracle-db` — Generic Oracle Database via AIDP `aidataplatform`

For non-Autonomous Oracle DBs — Oracle on Compute, Base DB, on-prem, customer-managed Oracle 19c/21c/23ai/26ai. Auth is plain user/password over TCP 1521.

## When to use
- User wants to read or write a non-Autonomous Oracle Database from an AIDP notebook.
- User mentions: "Oracle Database", "generic Oracle DB", "on-prem Oracle", "Oracle 19c", "Oracle 21c", "Oracle 23ai non-Autonomous", "Base DB", "Oracle on Compute".
- User has a host/port + plain user/password (no wallet, no IAM DB-Token).

## When NOT to use
- For Autonomous DB family (ALH/ADW/ATP) → [`aidp-alh`](../aidp-alh/SKILL.md). Autonomous always uses TCPS + wallet (or IAM DB-Token) — `aidp-oracle-db` won't work.
- For Exadata Cloud Service → [`aidp-exacs`](../aidp-exacs/SKILL.md). ExaCS has its own NNE pattern.
- For PeopleSoft / Siebel — those run on Oracle DB but have their own dedicated skills with the right schema defaults.

## Prerequisites in the AIDP notebook
1. Helpers on `sys.path` (run `aidp-connectors-bootstrap` first).
2. Network: cluster must reach the Oracle DB host on the listener port (typically 1521). For private DBs in customer VCNs, VCN peering is required.
3. Env vars / OCI Vault secrets:
   - `ORADB_HOST`, `ORADB_PORT` (typically `1521`)
   - `ORADB_DATABASE_NAME` (Oracle service name) or `ORADB_DATABASE_SID`
   - `ORADB_USER`, `ORADB_PASSWORD`
   - `ORADB_SCHEMA`, `ORADB_TABLE`

## Read (inline options)

```python
import os
from oracle_ai_data_platform_connectors.aidataplatform import (
    AIDP_FORMAT, aidataplatform_options,
)

opts = aidataplatform_options(
    type="ORACLE_DB",
    host=os.environ["ORADB_HOST"],
    port=int(os.environ.get("ORADB_PORT", "1521")),
    database_name=os.environ["ORADB_DATABASE_NAME"],
    user=os.environ["ORADB_USER"],
    password=os.environ["ORADB_PASSWORD"],
    schema=os.environ["ORADB_SCHEMA"],
    table=os.environ["ORADB_TABLE"],
    extra={
        # Optional official connector options:
        # "database.sid": os.environ["ORADB_DATABASE_SID"],
        # "row.limit": "1000",
        # "fetch.size": "10000",
        # "partition.column": "ID",
        # "partition.num": "8",
        # "partition.lower": "1",
        # "partition.upper": "1000000",
    },
)
df = spark.read.format(AIDP_FORMAT).options(**opts).load()
df.show(10)
```

## Write (inline options)

```python
opts = aidataplatform_options(
    type="ORACLE_DB",
    host=os.environ["ORADB_HOST"],
    port=int(os.environ.get("ORADB_PORT", "1521")),
    database_name=os.environ["ORADB_DATABASE_NAME"],
    user=os.environ["ORADB_USER"],
    password=os.environ["ORADB_PASSWORD"],
    schema=os.environ["ORADB_SCHEMA"],
    table=os.environ["ORADB_TARGET_TABLE"],
    extra={
        "write.mode": "APPEND",   # CREATE | APPEND | OVERWRITE | MERGE
        # "write.merge.keys": "ID",
        # "write.batch.size": "10000",
        # "write.empty.value.as.null": "true",
        # "preserve.oracle.column.types": "EMBEDDING VECTOR(512, FLOAT32), DOC JSON",
        # "oracle.write.native.boolean": "true",
        # "oracle.append.hint.enabled": "true",
    },
)
df.write.format(AIDP_FORMAT).options(**opts).save()
```

## Read via existing external catalog (`catalog.id`)

If your AIDP workspace already has the Oracle DB registered as an external catalog, drop the host/port/credentials entirely and reference the catalog by id:

```python
opts = aidataplatform_options(
    type="ORACLE_DB",
    schema=os.environ["ORADB_SCHEMA"],
    table=os.environ["ORADB_TABLE"],
    extra={"catalog.id": os.environ["ORADB_CATALOG_ID"]},
)
df = spark.read.format(AIDP_FORMAT).options(**opts).load()
df.show(10)
```

Or use three-part naming via `spark.table()`:

```python
df = spark.table(f"{os.environ['ORADB_CATALOG_ID']}.{os.environ['ORADB_SCHEMA']}.{os.environ['ORADB_TABLE']}")
df.show(10)
df.write.mode("overwrite").saveAsTable(
    f"{os.environ['ORADB_CATALOG_ID']}.{os.environ['ORADB_SCHEMA']}.{os.environ['ORADB_TARGET_TABLE']}"
)
```

## Pushdown SQL

```python
opts = aidataplatform_options(
    type="ORACLE_DB",
    host=os.environ["ORADB_HOST"],
    port=int(os.environ.get("ORADB_PORT", "1521")),
    database_name=os.environ["ORADB_DATABASE_NAME"],
    user=os.environ["ORADB_USER"],
    password=os.environ["ORADB_PASSWORD"],
    extra={
        "pushdown.sql": (
            "SELECT department_id, COUNT(*) AS headcount, SUM(salary) AS total "
            "FROM HR.EMPLOYEES "
            "WHERE hire_date >= DATE '2024-01-01' "
            "GROUP BY department_id"
        ),
    },
)
df = spark.read.format(AIDP_FORMAT).options(**opts).load()
df.show()
```

## External catalog pushdown

```python
df = spark.read.table(
    f"{os.environ['ORADB_CATALOG_ID']}.{os.environ['ORADB_SCHEMA']}.{os.environ['ORADB_TABLE']}"
)
df.select("DEPARTMENT_ID", "SALARY").filter("DEPARTMENT_ID = 10").limit(100).show()

df.write.option("write.mode", "MERGE").option("write.merge.keys", "EMPLOYEE_ID").insertInto(
    f"{os.environ['ORADB_CATALOG_ID']}.{os.environ['ORADB_SCHEMA']}.{os.environ['ORADB_TARGET_TABLE']}"
)
```

## Gotchas
- **`database.name` is the Oracle service name; `database.sid` is the SID.** Both are supported by the official sample option table; don't confuse either with `schema`.
- **Wallet options exist for Oracle DB in the AIDP connector** (`wallet.content`, `wallet.path`, `wallet.password`), but plain user/password is the default sample path. For Autonomous DB, use `aidp-alh`.
- **Network reachability** is the most common failure. From the cluster: `socket.create_connection((host, 1521), timeout=8)`. Failure = network problem (NSG / route table / DNS), not auth.
- **Write modes** — `CREATE`, `APPEND`, `OVERWRITE`, and `MERGE`. For `MERGE`, pass `write.merge.keys`.
- **Oracle write controls** — the sample exposes `preserve.oracle.column.types`, `oracle.write.native.boolean`, `oracle.append.hint.enabled`, `overwrite.with.recreate`, and merge filters. Surface these when the user asks about vectors, JSON, booleans, append performance, or upserts.
- **NLS settings.** Default Oracle dates can come back with timezone surprises. Set `extra={"oracle.jdbc.timezoneAsRegion": "false"}` if you see TZ drift.

## References
- Helper: [scripts/oracle_ai_data_platform_connectors/aidataplatform.py](../../scripts/oracle_ai_data_platform_connectors/aidataplatform.py)
- Official sample: [oracle-samples/oracle-aidp-samples → `data-engineering/ingestion/Read_Write_Oracle_Ecosystem_Connectors/Oracle_Database.ipynb`](https://github.com/oracle-samples/oracle-aidp-samples/blob/main/data-engineering/ingestion/Read_Write_Oracle_Ecosystem_Connectors/Oracle_Database.ipynb)

Wersje

W bazie nie ma innych skilli o nazwie aidp-oracle-db.

Identyczna treść występuje jeszcze w 2 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

Migawka bazy z 13.11.2026 · wersja paczki 34cb2c42244c (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 1 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100aidp-db2
    Odczytuje lub zapisuje IBM Db2 z notatnika AIDP przez format Spark aidataplatform, z logowaniem hostem, portem, nazwą bazy oraz użytkownikiem i hasłem.
  • 100aidp-sqlserver
    Odczytuje lub zapisuje Microsoft SQL Server z notatnika AIDP przez format Spark aidataplatform, z hostem, portem, bazą, użytkownikiem i hasłem.
  • 90oracle-database-expert
    Wspiera inżynierię Oracle Database 23ai i Autonomous Database: projekt schematów, strojenie SQL i PL/SQL, AI Vector Search, JSON Relational Duality, partycjonowanie, wysoką dostępność i bezpieczeństwo.
  • 84analyze-oracle-schema
    Analizuje schemat Oracle i tworzy raport w Markdown: tabele, wyzwalacze, typy, kod PL/SQL i zależności.
  • 100oraas-utl-file-migration
    Migruje kod PL/SQL używający UTL_FILE do Oracle Autonomous Database, instalując zgodną warstwę pośredniczącą i zmieniając wywołania bez przepisywania logiki biznesowej.
  • 100oracle-expert
    Wspiera pracę z Oracle Database: programowanie PL/SQL, Oracle RAC, Data Guard, strojenie wydajności, kopie zapasowe i odtwarzanie oraz administrację korporacyjnymi bazami danych.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.