aidp-alh
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.
What this skill does
# `aidp-alh` — Oracle AI Lakehouse / ADW / ATP via Spark JDBC
This 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.
## When to use
- User wants to read or write an ALH, ADW, or ATP table from an AIDP notebook.
- User mentions: "ALH", "AI Lakehouse", "ADW", "Autonomous Data Warehouse", "ATP", "Autonomous Transaction Processing", "Autonomous Database", "26ai lakehouse", "lakehouse external catalog".
- User has an Autonomous DB wallet, an Autonomous DB connection string, or an externally-cataloged Autonomous DB in AIDP.
## When NOT to use
- For ExaCS / on-prem Oracle → use [`aidp-exacs`](../aidp-exacs/SKILL.md).
## Prerequisites in the AIDP notebook
1. The Oracle JDBC driver (`ojdbc11.jar` or `ojdbc8.jar`) must be on the cluster classpath. AIDP `tpcds` cluster ships it; if not, attach via Cluster → Libraries.
2. Add the helper package to `sys.path` (one-time, paste at the top of your notebook):
```python
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.)
3. Have one of: an ALH wallet ZIP (Option A), DB-token compartment OCID + API key (Option B), or admin OCI config (Option C).
**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.
## Auth: pick one
### Option A — Wallet (mTLS, recommended default)
```python
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)
```
### Option B — IAM DB-Token (validated against ATP via IMFA IoT, 3/3 successful)
```python
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)
```
### Option C — API Key + inline OCI config (catalog-sync side only)
The catalog-sync metadata harvest from ALH into the AIDP external catalog uses OCI control-plane APIs, not JDBC. For that side use:
```python
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
```
## Run the query
Standard Spark JDBC. For large reads, partition the read:
```python
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):
```python
(df.write.format("jdbc").options(**opts)
.option("dbtable", "MY_SCHEMA.TARGET_TABLE")
.mode("overwrite")
.save())
```
## Gotchas
- **Wallet must live under `/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.
- **External catalog refresh** uses `CREATE EXTERNAL CATALOG ... OPTIONS('wallet.content'=base64, 'user.name'=..., 'password'=..., 'wallet.password'=...)`. Same DB credentials as Option A.
- **TNS service name** — confirm via the wallet's `tnsnames.ora`. Not always `alh_high`.
- **Instance Principal / Resource Principal** are blocked in AIDP notebooks today (IMDS unreachable, RP tokens not provided). Don't try `InstancePrincipalsSecurityTokenSigner()`.
## References
- Helpers: [scripts/oracle_ai_data_platform_connectors/jdbc/oracle.py](../../scripts/oracle_ai_data_platform_connectors/jdbc/oracle.py)
- Wallet helper: [scripts/oracle_ai_data_platform_connectors/auth/wallet.py](../../scripts/oracle_ai_data_platform_connectors/auth/wallet.py)
- AIDP notebook auth limits: `Claude context/AIDP/AIDP Context/AIDP/aidp-notebook-authentication.md`
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.