/oracle-ai-data-platform-workbench-spark-connectors:aidp-alhfrom oracle-ai-data-platform-workbench-spark-connectors
Connect from an AIDP notebook to Oracle AI Lakehouse (ALH), Autonomous Data Warehouse (ADW), or Autonomous Transaction Processing (ATP) via Spark JDBC. Use when the user mentions ALH, AI Lakehouse, ADW, ATP, Autonomous Database, or wants to query a 26ai-backed Oracle Autonomous DB from Spark. Covers wallet (mTLS), IAM DB-Token (with on-executor refresh for long jobs), and API Key auth paths.
Ships in oracle-ai-data-platform-workbench-spark-connectors. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
aidp-alh — Oracle AI Lakehouse / ADW / ATP via Spark JDBCThis skill covers the entire Oracle Autonomous Database family — ALH, ADW, ATP — because they are all Oracle 26ai under the hood. Same JDBC driver (oracle.jdbc.OracleDriver), same URL pattern (jdbc:oracle:thin:@tcps://...:1522/...), same TNS service-name shape (_high/_medium/_low), same wallet flow, same IAM DB-Token flow.
If the user names ATP or ADW specifically, just use this skill — substitute the env-var prefix (ATP_* / ADW_*) for ALH_* and proceed identically.
aidp-exacs.ojdbc11.jar or ojdbc8.jar) must be on the cluster classpath. AIDP tpcds cluster ships it; if not, attach via Cluster → Libraries.sys.path (one-time, paste at the top of your notebook):
import sys
sys.path.insert(0, "/Workspace/Shared/oracle_ai_data_platform_connectors/scripts")
(Adjust the path to wherever you've uploaded this plugin's scripts/ dir, or pip-install the package once it's published.)Background: ALH is plain Oracle 26ai under the hood. The oracle.jdbc.OracleDriver, the URL pattern (jdbc:oracle:thin:@tcps://...:1522/...), and the TNS service-name shape (_high/_medium/_low) all transfer 1:1 from ATP. If you've used ATP from AIDP before, this looks identical.
import os
from oracle_ai_data_platform_connectors.auth import write_wallet_to_tmp
from oracle_ai_data_platform_connectors.jdbc import (
build_oracle_jdbc_url, spark_jdbc_options_wallet,
)
# Write wallet to /tmp (NEVER /Workspace — FUSE breaks the JDBC driver's reads)
tns_admin = write_wallet_to_tmp(
wallet="/path/to/alh-wallet.zip", # or pass bytes from OCI Vault
target_dir="/tmp/wallet/alh",
)
url = build_oracle_jdbc_url(
tns_alias=os.environ["ALH_TNS_SERVICE"], # e.g. "alh_high"
tns_admin=tns_admin,
)
opts = spark_jdbc_options_wallet(
url=url,
user=os.environ["ALH_USER"],
password=os.environ["ALH_PASSWORD"],
)
df = spark.read.format("jdbc").options(**opts).option("dbtable", "MY_SCHEMA.MY_TABLE").load()
df.show(5)
import os
from oracle_ai_data_platform_connectors.auth import generate_db_token
from oracle_ai_data_platform_connectors.auth.dbtoken import refresh_on_executors
from oracle_ai_data_platform_connectors.jdbc import (
build_oracle_jdbc_url, spark_jdbc_options_dbtoken,
)
token_dir = generate_db_token(
compartment_ocid=os.environ["ALH_COMPARTMENT_OCID"],
target_dir="/tmp/dbcred_alh",
)
url = build_oracle_jdbc_url(
tns_alias=os.environ["ALH_TNS_SERVICE"],
tns_admin=os.environ.get("ALH_WALLET_PATH", "/tmp/wallet/alh"),
)
opts = spark_jdbc_options_dbtoken(url=url, token_dir=token_dir)
df = spark.read.format("jdbc").options(**opts).option("dbtable", "MY_TABLE").load()
# For long-running jobs (>25 min), wrap your partition logic with refresh_on_executors:
refresh = refresh_on_executors(spark, os.environ["ALH_COMPARTMENT_OCID"], "/tmp/dbcred_alh")
result = df.rdd.mapPartitions(lambda part: refresh(part)).toDF(df.schema)
The catalog-sync metadata harvest from ALH into the AIDP external catalog uses OCI control-plane APIs, not JDBC. For that side use:
from oracle_ai_data_platform_connectors.auth import from_inline_pem
config = from_inline_pem(
user_ocid=os.environ["OCI_USER_OCID"],
tenancy_ocid=os.environ["OCI_TENANCY_OCID"],
fingerprint=os.environ["OCI_FINGERPRINT"],
private_key_pem=os.environ["OCI_PRIVATE_KEY_PEM"],
region=os.environ["OCI_REGION"],
)
# pass `config` to oci.<service>Client(config=config) — never write the PEM to disk
Standard Spark JDBC. For large reads, partition the read:
df = (
spark.read.format("jdbc").options(**opts)
.option("dbtable", "(SELECT id, x, y FROM big_table) t")
.option("partitionColumn", "id")
.option("lowerBound", "1")
.option("upperBound", "10000000")
.option("numPartitions", "16")
.load()
)
For writeback (overwrite only — external catalogs don't support DDL):
(df.write.format("jdbc").options(**opts)
.option("dbtable", "MY_SCHEMA.TARGET_TABLE")
.mode("overwrite")
.save())
/tmp. /Workspace is FUSE-mounted; the JDBC driver process can't read it reliably (Errno 107).os.chmod is a no-op on FUSE. The helper uses os.open(..., O_WRONLY|O_CREAT, 0o666) so the JDBC driver process (different UID) can read the wallet/token.oracle.jdbc.timezoneAsRegion=false — set in helper defaults; avoids the well-known TZ region warning.CREATE EXTERNAL CATALOG ... OPTIONS('wallet.content'=base64, 'user.name'=..., 'password'=..., 'wallet.password'=...). Same DB credentials as Option A.tnsnames.ora. Not always alh_high.InstancePrincipalsSecurityTokenSigner().Claude context/AIDP/AIDP Context/AIDP/aidp-notebook-authentication.mdWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub ahmedawan-oracle/claude-code-plugins --plugin oracle-ai-data-platform-workbench-spark-connectors25 skills in this plugin
/aidp-aws-s3`aidp-aws-s3` — AWS S3 via the S3A connectorRead and write AWS S3 (`s3a://`) from an AIDP notebook. Use when the user mentions S3, AWS S3 bucket, s3a, or has AWS access keys. Auth is access key + secret key via the Hadoop S3A connector. boto3 is also available for non-Spark management operations (list, copy)./aidp-azure-adls`aidp-azure-adls` — Azure ADLS Gen2 via OAuth client-credentialsRead and write Azure Data Lake Storage Gen2 (`abfss://`) from an AIDP notebook. Use when the user mentions ADLS, Azure Data Lake, abfss, or wants to ingest from a multi-cloud Azure source. Auth is OAuth client-credentials (Service Principal client_id + secret + tenant)./aidp-connectors-bootstrap`aidp-connectors-bootstrap` — first-time setup of the helper package in AIDPFirst-time setup. Use when the user wants to install/upload the AIDP Spark connectors helper package into their AIDP workspace, or has just installed this plugin and asks "how do I set it up", "first-time setup", "install the helpers", "bootstrap aidp connectors". Drives the AIDP MCP tools to push the helper package to /Workspace/Shared/ and runs a sanity import./aidp-connectors-overview`aidp-connectors-overview` — pick the right connector skillHelp the user pick the right connector skill for their data source from an AIDP notebook. Use as a router when the user mentions multiple sources, isn't sure which connector applies, or asks "how do I connect to X from AIDP". Covers 23 data sources — Oracle Autonomous DB family (ALH/ADW/ATP), generic Oracle DB, ExaCS, PeopleSoft, Siebel, Fusion ERP/BICC, EPM Cloud, Essbase, OCI Streaming, Object Storage, Iceberg, plus PostgreSQL, MySQL/HeatWave, SQL Server, Hive, Snowflake, Azure ADLS, AWS S3, Salesforce, generic REST, custom JDBC, Excel./aidp-epm-cloud`aidp-epm-cloud` — EPM Cloud Planning REST → SparkRun a Planning data-slice export against Oracle EPM Cloud (Planning / EPBCS) and materialize as a Spark DataFrame in an AIDP notebook. Use when the user mentions EPM Cloud, EPBCS, Hyperion Planning, planning app, MDX export, or wants Planning data in Spark. HTTP Basic auth with identity-domain-prefixed username./aidp-essbase`aidp-essbase` — Essbase 21c MDX → SparkRun an MDX query against an Oracle Essbase 21c cube and materialize the result as a Spark DataFrame in an AIDP notebook. Use when the user mentions Essbase, MDX, Essbase 21c, OLAP cube, or wants to read cube data into Spark. Auth is HTTP Basic.