AIDP カタログを初回検索し、キャッシュ可能でバージョン管理できる .aidp/catalog.md ファイルを生成する機能です。テーブル、列、外部キー・結合のヒント、値の辞書などの基本情報をこのファイルに記録します。 次のような場合に使用: ユーザーが「/aidp-catalog-init」と指示した時、「データレイク(複数のデータソースを統合した環境)のマッピング・検索をしたい」と求めた時、データ検索の初期設定を行う時、またはカタログキャッシュが存在しない状態でデータに関する質問に答える前。 スキーマ(データの構造定義)に変更が生じた場合は、--refresh オプションを付けて再実行してください。
One-time AIDP catalog discovery that writes a cached, version-controllable .aidp/catalog.md grounding file (tables, columns, FK/join hints, value dictionaries). Use when the user says "/aidp-catalog-init", asks to "map/discover my lakehouse", set up data discovery, or before answering data questions when no catalog cache exists. Re-run with --refresh when the schema changes.
aidp-catalog-init — カタログ グラウンディングファイルの生成AIDPカタログツリーを走査し、.aidp/catalog.md を生成します。
これはキャッシュされたユーザー編集可能なグラウンディングファイルであり、
後続のNL→SQL変換を高速かつ高精度にするためのものです。
ディスカバリー処理は 純粋なコントロールプレーン — SQLなし・コンピュートなし
(オプションの --with-counts を除く。これはバンドル済みSQLヘルパーを使用)。
aidp MCPは不要な自己完結型スキルです。
--refresh を実行する場合。aidp CLI(コントロールプレーン、コンピュートなし)推奨エンジンはOracle公式の aidp CLI です。CLIがインストールされていない場合は
oci raw-request がフォールバックとして使用されます。
両者とも同一の認証情報で同一のデータプレーンREST APIにアクセスします。
スキル→コマンドの対応表は references/aidp-cli-map.md、
ベースURL・認証ラダー・規約については references/oci-raw-request.md を参照してください。
CLI(推奨):
# 1. カタログ一覧
aidp catalog list --instance-id <DATALAKE_OCID> --auth api_key --profile DEFAULT --region <r>
# 2. カタログ内のスキーマ一覧
aidp schema list --catalog-key <cat> --instance-id <DATALAKE_OCID> --auth api_key --profile DEFAULT --region <r>
# 3. スキーマ内のテーブル一覧(schema-keyは <cat.schema> 形式のドット区切り)
aidp schema list-tables --catalog-key <cat> --schema-key <cat.schema> --instance-id <DATALAKE_OCID> --auth api_key --profile DEFAULT --region <r>
# 単一リソース取得: aidp catalog get · aidp schema get · aidp schema get-table
フォールバック(CLIなし) — oci raw-request
(LIVE-VERIFIED 20240831 / dataLakes / --profile DEFAULT —
references/no-mcp-rest-map.md 参照):
B="https://aidp.<region>.oci.oraclecloud.com/20240831/dataLakes/<DATALAKE_OCID>"
oci raw-request --http-method GET --target-uri "$B/catalogs" --profile DEFAULT
oci raw-request --http-method GET --target-uri "$B/schemas?catalogKey=<cat>" --profile DEFAULT
oci raw-request --http-method GET --target-uri "$B/tables?catalogKey=<cat>&schemaKey=<cat.schema>" --profile DEFAULT
aidp schema get-table(またはREST tables?… リスト。カラム・型・プロパティを返す)を使用し、キーでクライアント側フィルタリングしてください(単一テーブル専用パラメータは未確認 — no-mcp-rest-map.md 参照)。400 InvalidParameter: query param X must not be null(不足パラメータ名付き)を返します。401/403 / "Security Token" エラーが発生した場合は、oci-raw-request.md の認証ラダー(AIDP_SESSION をリフレッシュし、--auth security_token でリトライ)に従ってください。ツリーの走査(コンピュートなし):
aidp catalog list → 各カタログに対して aidp schema list --catalog-key →
各スキーマに対して aidp schema list-tables --catalog-key --schema-key(カラム・型・プロパティ取得)
— またはRESTフォールバックを使用。
大規模カタログの場合は、カタログ1件につきサブエージェント1つを起動して並列ディスカバリーを行ってください。
グラウンディングヒントの収集(NL→SQL精度向上の核心部分):
*_sk、*_id、カラム名の一致)やテーブルプロパティの宣言済みキーから結合キーを推定し、agentが後でJOINを誤推測しないよう記録します。--with-counts パス)のみdistinct値を取得するか、TODOとしてマークします。コードベースからの補完(存在する場合): 既存のノートブック・SQLファイル・CLAUDE.md から説明文を取り込みます。
.aidp/catalog.md の書き込み:
以下のセクションで構成します:
Quick Reference(概念→テーブル対応)、
Catalogs → schemas → tables(カラム・型・JOINキー・フラグ)、
Value dictionaries、
Gotchas。
--refresh 時はユーザー編集とHTMLコメントを保持し、削除されたテーブルには <!-- REMOVED --> を付記します。
ユーザーへのサマリー表示:
(N catalogs / schemas / tables、大規模テーブルのフラグ情報)
次のステップとして aidp-semantic-model(メトリクス定義)や
aidp-analyzing-data(データへの質問)を提案します。
--refresh — ユーザー編集・Quick Referenceの行を保持しながら再生成します。
--catalog <name> — 対象を1カタログに限定します。
--with-counts — バンドル済みSQLヘルパー経由で行数・distinct値も取得します
(クラスターを使用するため、デフォルトOFF — コンピュートコストが発生し、稼働中のクラスターが必要):
python "$PLUGIN_DIR/scripts/aidp_sql.py" --region <r> --datalake <DATALAKE_OCID> --workspace <ws> --cluster <key> \
--code "spark.sql('SELECT COUNT(*) AS n FROM <cat>.<schema>.<table>').show()"
status / outputs / spark_job_ids を含むJSONを返します。
api_key DEFAULTプロファイルからUPSTを生成し、スクラッチノートブックを自動作成します
(AIDP_SESSION不要)。
コントロールプレーン側については references/oci-raw-request.md を参照してください。
.aidp/catalog.md)# AIDP catalog — generated <date> (edit freely)
## Quick Reference
| Concept | Table | Key |
|---|---|---|
| customers | default.default.customer | c_customer_sk |
## <catalog> → <schema>
#### <table> (rows: <n if --with-counts>; LARGE if big)
| Column | Type | Notes (PK/FK/join) |
## Value dictionaries
## Gotchas
<region> / <DATALAKE_OCID> / <workspace> は明示的に解決してください。
カタログ呼び出しはDataLakeスコープ、SQLヘルパーはworkspace + clusterスコープです。.aidp/ はgit-ignoreされています — プロジェクト単位のキャッシュであり、pluginには同梱されません。…/dataLakes/<OCID>/extractors(/metadataExtractors ではなく — 旧メモが誤ったパスを参照していたため404になる)。
LIVE-VERIFIED 2026-06-12: GET …/20240831/dataLakes/<OCID>/extractors → 200 {"items":[]}.
公開サーフェス:
GET/POST/DELETE /extractors、
GET /extractors/<key>/extractedEntities、
GET /extractors/<key>/extractedTables/<name>、
POST /extractors/<key>/actions/manageExtractedEntities(accept/reject/import)、
ライフサイクル: ACCEPTED→IN_PROGRESS→SUCCEEDED/FAILED/IN_REVIEW。
これは上記のディスカバリーウォークと aidp-ingest-file-to-table を補完するもので、置き換えるものではありません。
create/manage の書き込みパスは(Object Storageソースが必要なため)実際に使用する前にライブ検証してください。list_catalogs / list_schemas / list_tables / get_table を使用できますが、必須ではありません。aidp CLIコマンド対応表(プライマリエンジン)aidp-catalog-init — build the catalog grounding fileWalk the AIDP catalog tree and generate .aidp/catalog.md — the cached, user-editable grounding file that
makes subsequent NL-to-SQL fast and accurate.
Discovery is pure control-plane — no SQL, no compute (except optional --with-counts, which uses
the bundled SQL helper). Self-contained: no aidp MCP required.
--refresh after schema changes.aidp CLI (control-plane, no compute)Preferred engine is the official Oracle aidp CLI; oci raw-request is the fallback when the CLI isn't
installed. Both hit the same data-plane REST API with the same auth — see
references/aidp-cli-map.md for the full skill→command map and
references/oci-raw-request.md for base URL + auth ladder + conventions.
CLI (preferred):
# 1. catalogs
aidp catalog list --instance-id <DATALAKE_OCID> --auth api_key --profile DEFAULT --region <r>
# 2. schemas in a catalog
aidp schema list --catalog-key <cat> --instance-id <DATALAKE_OCID> --auth api_key --profile DEFAULT --region <r>
# 3. tables in a schema (schema-key is the dotted <cat.schema>)
aidp schema list-tables --catalog-key <cat> --schema-key <cat.schema> --instance-id <DATALAKE_OCID> --auth api_key --profile DEFAULT --region <r>
# single catalog/schema/table: aidp catalog get · aidp schema get · aidp schema get-table
Fallback (no CLI installed) — oci raw-request (LIVE-VERIFIED 20240831 / dataLakes /
--profile DEFAULT — see references/no-mcp-rest-map.md):
B="https://aidp.<region>.oci.oraclecloud.com/20240831/dataLakes/<DATALAKE_OCID>"
oci raw-request --http-method GET --target-uri "$B/catalogs" --profile DEFAULT
oci raw-request --http-method GET --target-uri "$B/schemas?catalogKey=<cat>" --profile DEFAULT
oci raw-request --http-method GET --target-uri "$B/tables?catalogKey=<cat>&schemaKey=<cat.schema>" --profile DEFAULT
aidp schema get-table (or the REST tables?… list, which returns columns,
types, and properties); filter to the one
table client-side by its key (no dedicated single-table param confirmed — see no-mcp-rest-map.md).400 InvalidParameter: query param X must not be null, which names the missing param.401/403/"Security Token", follow the auth ladder (refresh AIDP_SESSION, retry with
--auth security_token) in oci-raw-request.md.aidp catalog list → for each, aidp schema list --catalog-key → for
each, aidp schema list-tables --catalog-key --schema-key (columns, types, properties) — or the REST
fallback above. For large catalogs, fan out one subagent per catalog to parallelize discovery.*_sk, *_id, shared column names) and any
declared keys in the table properties. Record them so the agent doesn't guess joins later.--with-counts path), or mark TODO..aidp/catalog.md with sections: Quick Reference (concept→table), Catalogs → schemas →
tables (columns, types, join keys, flags), Value dictionaries, Gotchas. Preserve user edits + HTML
comments on --refresh; flag removed tables with <!-- REMOVED -->.aidp-semantic-model for metrics, aidp-analyzing-data to ask questions).--refresh — regenerate, preserving user edits and Quick-Reference rows.
--catalog <name> — limit to one catalog.
--with-counts — also fetch row counts / distinct values via the bundled SQL helper (uses the cluster,
off by default — it costs compute and needs a running cluster):
python "$PLUGIN_DIR/scripts/aidp_sql.py" --region <r> --datalake <DATALAKE_OCID> --workspace <ws> --cluster <key> \
--code "spark.sql('SELECT COUNT(*) AS n FROM <cat>.<schema>.<table>').show()"
Returns JSON with status / outputs / spark_job_ids; mints a UPST from the api_key DEFAULT profile and
auto-creates a scratch notebook (no AIDP_SESSION required). See
references/oci-raw-request.md for the control-plane side.
.aidp/catalog.md)# AIDP catalog — generated <date> (edit freely)
## Quick Reference
| Concept | Table | Key |
|---|---|---|
| customers | default.default.customer | c_customer_sk |
## <catalog> → <schema>
#### <table> (rows: <n if --with-counts>; LARGE if big)
| Column | Type | Notes (PK/FK/join) |
## Value dictionaries
## Gotchas
<region> / <DATALAKE_OCID> / <workspace> explicitly — catalog calls are scoped to the
DataLake; the SQL helper is scoped to a workspace + cluster..aidp/ is git-ignored — it's a per-project cache, not shipped with the plugin.…/dataLakes/<OCID>/extractors (NOT /metadataExtractors, which 404s — an earlier note probed the wrong
path). LIVE-VERIFIED 2026-06-12: GET …/20240831/dataLakes/<OCID>/extractors → 200 {"items":[]}.
Surface: GET/POST/DELETE /extractors, GET /extractors/<key>/extractedEntities,
GET /extractors/<key>/extractedTables/<name>, POST /extractors/<key>/actions/manageExtractedEntities
(accept/reject/import), lifecycle ACCEPTED→IN_PROGRESS→SUCCEEDED/FAILED/IN_REVIEW. This complements (does
not replace) the discovery walk above and aidp-ingest-file-to-table. Probe the create/manage write paths
live (need an Object Storage source) before relying on them.list_catalogs /
list_schemas / list_tables / get_table instead of the raw calls, but it is not required.aidp CLI command map (primary engine)原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。