From oracle-ai-data-platform-workbench-spark-connectors
Reads or writes a non-Autonomous Oracle Database (Compute, Base DB, on-prem, 19c–26ai) from an AIDP notebook via the AIDP aidataplatform Spark format handler. Auth is host/port + database name + user/password.
How this skill is triggered — by the user, by Claude, or both
Slash command
/oracle-ai-data-platform-workbench-spark-connectors:aidp-oracle-dbThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
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.
aidp-oracle-db — Generic Oracle Database via AIDP aidataplatformFor 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.
aidp-alh. Autonomous always uses TCPS + wallet (or IAM DB-Token) — aidp-oracle-db won't work.aidp-exacs. ExaCS has its own NNE pattern.sys.path (run aidp-connectors-bootstrap first).ORADB_HOST, ORADB_PORT (typically 1521)ORADB_DATABASE_NAME (Oracle SID or service name)ORADB_USER, ORADB_PASSWORDORADB_SCHEMA, ORADB_TABLEimport 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"],
)
df = spark.read.format(AIDP_FORMAT).options(**opts).load()
df.show(10)
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
)
df.write.format(AIDP_FORMAT).options(**opts).save()
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:
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():
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']}"
)
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()
database.name is the Oracle SID or service name, not the schema. Easy mix-up.aidp-alh.socket.create_connection((host, 1521), timeout=8). Failure = network problem (NSG / route table / DNS), not auth.CREATE (fail if exists), APPEND, OVERWRITE. Use MERGE only via pushdown.sql (MERGE INTO ... WHEN MATCHED ...) or three-part saveAsTable with write.merge.keys.extra={"oracle.jdbc.timezoneAsRegion": "false"} if you see TZ drift.npx claudepluginhub anthropics/claude-plugins-official --plugin oracle-ai-data-platform-workbench-spark-connectorsConnects AIDP notebooks to Oracle AI Lakehouse, Autonomous Data Warehouse, or Autonomous Transaction Processing via Spark JDBC. Covers wallet (mTLS), IAM DB-Token, and API Key auth.
Routes AIDP tasks to the correct aidp-* skill and handles shared setup/auth troubleshooting.
Provisions OCI Autonomous Databases, downloads mTLS wallets, connects with python-oracledb, and migrates schemas via Data Pump.