移行前のデータ利用可能状況スキャン。移行マニフェスト(移行対象一覧)内のすべてのノートブックを読み込み、spark.read.table / spark.read.parquet / saveAsTable の参照を抽出し、AIDP クラスタ上でターゲットスキーマ/テーブル/パスが実際に存在するかを事前に確認します。Pass-2(検証用)クラスタの処理時間を費やす前に問題を検出できるため、特に初回のターゲット環境への移行時に役立ちます。 **次のような場合に使用:** aidp-build-dag の実行後、aidp-migrate-job の実行前
Pre-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-check-data — 移行前データ可用性スキャンマイグレーターのPass-2は高コストです(ライブクラスター時間 + セルごとのtool-use付きClaudeトークンを消費します)。 このスキャンを事前に実行することで、「ソーステーブルが存在しない」「バケットが誤っている」といった障害パターンを、数時間ではなく数秒で検出できます。
aidp-build-dag の実行後、aidp-migrate-job の実行前。aidp-migrate-catalog の実行後(スキーマとテーブルが実際に正常に作成されたかを検証する場合)。python3 ${CLAUDE_PLUGIN_ROOT}/engine/scripts/check_data_availability.py \
--root "<databricks-workspace-path>" \
--cluster <CLUSTER_ID> \
--aidp-base <AIDP_BASE> \
--datalake-ocid <DATALAKE_OCID> \
--workspace-id <WORKSPACE_UUID> \
--oci-profile <profile>
ワークフロー形式の入力(aidp-build-dag のワークフローパスに対応)の場合:
python3 ${CLAUDE_PLUGIN_ROOT}/engine/scripts/check_data_availability_for_workflow.py \
--job-id <databricks-job-id> \
--cluster <CLUSTER_ID> \
--aidp-base <AIDP_BASE> \
--datalake-ocid <DATALAKE_OCID> \
--workspace-id <WORKSPACE_UUID> \
--oci-profile <profile>
spark.read.table("...") / spark.table("...")spark.read.parquet/csv/json/delta("...").saveAsTable("...")(書き込み先テーブル)%sql / spark.sql(...) 文字列内の3パート名参照DESCRIBE TABLE <fq>(さらに SHOW TABLES IN <schema> で「スキーマ不在」と「テーブル不在」を判別)dbutils.fs.ls(path) を実行出力例:
== check_data_availability_for_workflow report ==
TABLES
OK <catalog>.<schema>.<table_a> 1234567 rows
MISSING <catalog>.<schema>.<table_b> -- DESCRIBE failed: SCHEMA_OR_TABLE_NOT_FOUND
EMPTY <catalog>.<schema>.<table_c> 0 rows
PATHS
OK oci://<bucket>@<ns>/path/to/file 52 objects
MISSING oci://<bucket>@<ns>/missing/path -- listObjects 404
MISSING の行 → Pass-2は該当セルで必ず失敗します。対処方法:
aidp-migrate-catalog を実行する。s3:// → oci:// への書き換えが未実施の場合は aidp-bucket-mapping を設定する。EMPTY の行 → Pass-2はエラーなく通過するかもしれませんが、下流のテーブルも空になります。 これはサイレント障害パターンです。以下のいずれかを判断してください:
マニフェストに s3:// パスが含まれる場合、スキャナーはプローブ実行前に <migrator-repo>/config/oci_bucket_tenancy_mapping.json(またはバケットマッピングヘルパーが解決するファイル)を参照して変換を行います。
該当バケットがマッピングに存在しない場合、スキャナーは S3 bucket X not found in OCI bucket mapping というわかりやすいエラーを報告します。
aidp-bucket-mapping で修正後、再実行してください。
DESCRIBE 処理のみ — ウォームクラスター上ではサブ秒で完了。listObjects リクエスト — こちらも高速。schema.table(カタログなし)形式を使用している場合、スキャナーはクラスターの現在のカタログ(default)を基準に解決します。ユーザーがデフォルト以外のカタログを期待している場合は、その不一致を明示してください。Stopped 状態のクラスターでは、すべてのプローブが接続エラーで失敗します。先にクラスターを起動するようユーザーに案内してください。すべてOKの場合: aidp-migrate-job に進んでください。
MISSINGが存在する場合: aidp-migrate-catalog または aidp-bucket-mapping で解決後、このスキルを再実行してください。
aidp-check-data — pre-migration data-availability scanPass-2 of the migrator is expensive (live cluster time + Claude-with-tool-use tokens per cell). Running this scan first catches the "no source table" and "wrong bucket" failure modes in seconds instead of hours.
aidp-build-dag, before aidp-migrate-job.aidp-migrate-catalog (verify schemas + tables actually landed).python3 ${CLAUDE_PLUGIN_ROOT}/engine/scripts/check_data_availability.py \
--root "<databricks-workspace-path>" \
--cluster <CLUSTER_ID> \
--aidp-base <AIDP_BASE> \
--datalake-ocid <DATALAKE_OCID> \
--workspace-id <WORKSPACE_UUID> \
--oci-profile <profile>
Or for the workflow-shape input (matches aidp-build-dag's workflow path):
python3 ${CLAUDE_PLUGIN_ROOT}/engine/scripts/check_data_availability_for_workflow.py \
--job-id <databricks-job-id> \
--cluster <CLUSTER_ID> \
--aidp-base <AIDP_BASE> \
--datalake-ocid <DATALAKE_OCID> \
--workspace-id <WORKSPACE_UUID> \
--oci-profile <profile>
spark.read.table("...") / spark.table("...")spark.read.parquet/csv/json/delta("...").saveAsTable("...") (target — wrote-to)%sql / spark.sql(...) stringsDESCRIBE TABLE <fq> (and SHOW TABLES IN <schema> to differentiate "schema missing" from "table missing")dbutils.fs.ls(path) via the migrator's helperSample shape:
== check_data_availability_for_workflow report ==
TABLES
OK <catalog>.<schema>.<table_a> 1234567 rows
MISSING <catalog>.<schema>.<table_b> -- DESCRIBE failed: SCHEMA_OR_TABLE_NOT_FOUND
EMPTY <catalog>.<schema>.<table_c> 0 rows
PATHS
OK oci://<bucket>@<ns>/path/to/file 52 objects
MISSING oci://<bucket>@<ns>/missing/path -- listObjects 404
MISSING rows → Pass-2 will definitely fail at those cells. Options:
aidp-migrate-catalog if the underlying schema is missing.aidp-bucket-mapping if s3:// → oci:// rewrites haven't been done.EMPTY rows → Pass-2 may pass (no error) but produce empty downstream tables. This is the silent failure mode. Decide whether to:
If the manifest references s3:// paths, the scanner also consults <migrator-repo>/config/oci_bucket_tenancy_mapping.json (or whatever your bucket mapping helper resolves) to translate before probing. If the mapping is missing the bucket, the scanner reports a clear S3 bucket X not found in OCI bucket mapping. Fix via aidp-bucket-mapping and re-run.
DESCRIBE — sub-second on a warm cluster.listObjects against OCI Object Storage — also fast.schema.table (no catalog), the scanner resolves against the cluster's current catalog (default). If the user expects a non-default catalog, surface that mismatch.Stopped cluster will make every probe fail with a connection error — instruct the user to start the cluster first.If everything is OK: proceed to aidp-migrate-job.
If anything is MISSING: resolve via aidp-migrate-catalog or aidp-bucket-mapping and re-run this skill.
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。