/oracle-ai-data-platform-workbench-databricks-migrator:aidp-migrate-catalogfrom oracle-ai-data-platform-workbench-databricks-migrator
Migrates Databricks Unity Catalog/HMS schemas and tables onto AIDP via a two-stage extract→rewrite→replay pipeline. Run before aidp-migrate-job to ensure schemas exist on the target.
Ships in oracle-ai-data-platform-workbench-databricks-migrator. 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-migrate-catalog — Unity Catalog / HMS → AIDP DDL migrationThe notebook migration (Pass-2) reads tables. If the schemas + tables don't exist on AIDP first, every read fails. This skill ports the metadata layer.
aidp-migrate-job for the first time on a new target environment.aidp-check-data run reports many MISSING entries.┌─────────────────────────────────┐ ┌─────────────────────────────────┐
│ Stage 1: extract_catalog_ │ │ Stage 2: migrate_catalog.py │
│ databricks.py │ → │ reads catalog_pack.json, │
│ REST against Unity Catalog API │ │ applies the DDL rewrite rules, │
│ reports/catalog_pack.json │ │ batches into ONE WS execute │
│ │ │ on the AIDP cluster │
└─────────────────────────────────┘ └─────────────────────────────────┘
python3 ${CLAUDE_PLUGIN_ROOT}/engine/scripts/extract_catalog_databricks.py \
--catalogs "<catalog_a>,<catalog_b>" \
--schemas-only "<catalog_a>:<schema_1>,<catalog_a>:<schema_2>" \
--out reports/catalog_pack.json
| Flag | Purpose |
|---|---|
--catalogs | Comma-separated catalog names to extract. Use the source catalog names (e.g. the Unity Catalog you migrate from). |
--schemas-only | Optional filter — only extract these specific schemas. Format: <catalog>:<schema>,<catalog>:<schema>. Without it, ALL schemas in each catalog are extracted. |
--out | Output JSON path. The next stage reads this. |
--token-file | Optional. Path to an owner-only file (chmod 600) holding the Databricks PAT; otherwise DATABRICKS_TOKEN from the env is used. Never pass the token itself -- --token <value> is refused (exit 2). |
Env required:
DATABRICKS_HOST — https://<workspace>.cloud.databricks.comDATABRICKS_TOKEN — PAT with workspace + catalog read (or --token-file <path>; the token must never appear on the command line).The extractor uses Unity Catalog's REST API (/api/2.1/unity-catalog/tables with include_delta_metadata=true) and includes exponential backoff for rate limits. Expect 1-5 min per catalog depending on table count.
{
"catalogs": [
{
"name": "<source_catalog>",
"schemas": [
{
"name": "<schema>",
"tables": [
{
"name": "<table>",
"table_type": "MANAGED",
"data_source_format": "DELTA",
"storage_location": "s3://<bucket>/<path>",
"columns": [{"name": "id", "type_text": "long", "nullable": true}, ...],
"properties": {"delta.minReaderVersion": "2", ...},
"comment": null,
"partition_columns": ["date"]
}
]
}
]
}
]
}
python3 ${CLAUDE_PLUGIN_ROOT}/engine/scripts/migrate_catalog.py \
--pack reports/catalog_pack.json \
--aidp-cluster <CLUSTER_ID> \
--aidp-lake <LAKE_OCID> \
--aidp-workspace <WORKSPACE_UUID> \
--aidp-profile <profile> \
--out-manifest reports/catalog_manifest.json \
--out-report reports/catalog_report.md
--pack, --aidp-cluster, --aidp-lake, --aidp-workspace, --out-manifest, and --out-report are all required (--aidp-profile defaults to AIDP_API). The --out-manifest file is what you later feed to job_migrate_from_workflow.py --catalog-manifest so notebook literals get the same catalog remap.
Optional flags:
| Flag | Purpose |
|---|---|
--dry-run | Print the rewritten DDL but do NOT execute. Use first time to inspect. |
--catalog-map <path> | Explicit source→target catalog map. |
--default-catalog <name> | Target catalog for flattened names (default default). |
--bucket-map <path> | S3→OCI 3-column CSV (s3_bucket,oci_bucket,oci_namespace) for LOCATION rewrites. |
--flatten-strategy | How 3-part names flatten (default catalog-remap). |
--location-strategy | auto (default: EXTERNAL keeps the rewritten LOCATION, MANAGED drops it) / preserve / drop. |
--target-using <fmt> | Force a storage format; default preserves the source format (Delta stays Delta). |
There is no --chunk-size, --catalogs, or --schemas flag — filter at stage 1 (--catalogs / --schemas-only on the extractor) and the batching is automatic.
Full details in references/ddl-rewrite-rules.md. Quick summary:
| Rule | Input → Output |
|---|---|
| 3-part name flatten | <src_cat>.<schema>.<table> → <schema>.<table> (AIDP defaults to single-catalog default) |
s3:// → oci:// rewrite | s3://<bucket>/<path> → oci://<bucket>@<namespace>/<path> via bucket-map |
| Source format preserved | Default --target-using is None → Delta stays Delta. AIDP supports Delta natively. Pass --target-using parquet to deliberately convert. |
delta.* property strip | All delta.minReaderVersion, delta.minWriterVersion, etc. dropped |
spark.sql.* property strip | Reserved cluster-level configs, can't be set in DDL |
pipelines.* property strip | DLT-specific, not applicable |
view.query.* property strip | UC-specific view properties |
unity.* property strip | UC-specific |
| MV rejection | MATERIALIZED VIEW not supported on AIDP — DDL skipped + flagged |
| Streaming table rejection | STREAMING TABLE not supported — DDL skipped + flagged |
External-table LOCATION rewrite | Rewritten via the same s3://→oci:// bucket-map |
CREATE SCHEMA … COMMENT '<text>' colon strip | AIDP silently nukes a schema if its COMMENT contains a : — strip the COMMENT clause entirely. |
| etc. (full list in references) |
AIDP's Spark WS execute has a quirk: per-statement DDL is discarded if the session closes between statements. Workaround: batch all CREATE SCHEMA + CREATE TABLE (in dependency order) into ONE WS execute call. migrate_catalog.py does this batching automatically (there is no tuning flag).
This means if a single statement in a chunk fails, the WHOLE chunk's reported status may say success even though some tables aren't created. The migrator therefore probes existence post-execute for every statement and reports per-statement results.
After the migration, verify schemas + tables actually landed via aidp-check-data. Specifically:
spark.sql("SHOW SCHEMAS IN default").show(100, False)
spark.sql("SHOW TABLES IN default.<schema>").show(100, False)
spark.sql("DESCRIBE TABLE default.<schema>.<table>").show(100, False)
DESCRIBE TABLE confirms (a) the table exists and (b) the column types are what you expect.
oci os copy).aidp-bucket-mapping if any tables still have s3:// locations the bucket-map didn't cover.aidp-check-data to verify everything landed.aidp-migrate-job for the notebook layer.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
11 skills in this plugin
/aidp-acceptance-contractManifest-declared acceptance contract for batch and streaming pipelines that need convergence verification, not just "no exceptions". Declares PASS only after K consecutive zero-result windows (consecutive-zero-window convergence). Use for streaming jobs, slowly-draining backfills, or any pipeline whose success is "the pending queue is empty"./aidp-bucket-mappingConfigure the s3:// → oci:// bucket / namespace mapping the migrator uses to rewrite paths during notebook + catalog migration. Use when (a) the user has external tables / files at s3:// paths that need to land on OCI Object Storage, OR (b) check_data_availability reports s3:// paths as NOT FOUND because the bucket isn't mapped, OR (c) the DDL rewriter logs an R02_BUCKET_UNMAPPED warning./aidp-build-dagBuild a migration manifest (the execution DAG) from an AIDP workflow (exported from Databricks by dbx_export). Walks %run dependency chains, captures dbutils.notebook.run invocations, and emits reports/<job>_manifest.json — the input every other execute-skill consumes. Use when the user wants to see what would migrate, or before invoking aidp-migrate-job for the first time on a new workload./aidp-check-dataPre-migration data-availability scan. Reads every notebook in a migration manifest, extracts every spark.read.table / spark.read.parquet / saveAsTable reference, and probes whether each target schema/table/path exists on the AIDP cluster BEFORE you spend Pass-2 cluster time. Use after aidp-build-dag and before aidp-migrate-job, especially the first time you migrate against a target environment./aidp-dbx-exportExport a Databricks job into AIDP — notebooks, JARs, init scripts, workflow + cluster specs — via python3 -m dbx_export. Three phases (discover+download → upload → clusters+workflow) with AIDP-first dependency resolution. Artifacts are copied, NOT code-migrated; the migration itself comes later. Use FIRST, before aidp-build-dag / aidp-migrate-job, whenever the workload still lives only in Databricks./aidp-fixup-cellTargeted rewind of a migrated notebook. Re-executes cells from history index N onwards (or a specific cell range) through the execute+verify+fix loop, with a 'why' reason injected so Claude knows what to fix. Use when aidp-migrate-job left a notebook at RESULT=PARTIAL or the user identifies a specific cell that is wrong post-migration.Generated from the plugin's indexed repository (oracle-samples/oracle-aidp-samples) — no native marketplace selected
npx claudepluginhub p/oracle-samples-oracle-ai-data-platform-workbench-databricks-migrator-ai-claude-code-plugins-oracle-ai-data-platform-workbench-databricks-migratorOther plugins' skills for the same job