📋aidp-table-management
- ソース
- GitHub で見る ↗
説明
AIDPカタログオブジェクトのコントロールプレーンライフサイクル管理 — テーブル、ビュー、スキーマ、カタログの作成/更新/削除/リフレッシュ、 および外部カタログ/接続(ALH/ADW/オブジェクトストレージ)を 永続的なカタログオブジェクトとして登録します。 次のような場合に使用: - コントロールプレーン経由でテーブル/ビュー/スキーマ/カタログを作成または削除したい場合(SELECT 操作ではない) - 外部データソースをカタログとして登録したい場合 - カタログのメタデータをリフレッシュしたい場合 - 接続をテストしたい場合 SQLネイティブの CREATE/ALTER/DROP には `aidp-sql-ddl` を使用してください。 ファイルからテーブルへのインジェストには `aidp-ingest-file-to-table` を使用してください。 カタログの参照・探索には `aidp-catalog-explore` を使用してください。
原文を表示
Control-plane lifecycle for AIDP catalog objects — create/update/delete/refresh tables, views, schemas, and catalogs, and register an EXTERNAL catalog/connection (ALH/ADW/object-storage) as a persistent catalog object. Use when the user wants to create or drop a table/view/schema/catalog via the control plane (not a SELECT), register an external data source as a catalog, refresh catalog metadata, or test a connection. For SQL-native CREATE/ALTER/DROP use aidp-sql-ddl; for file→table ingestion use aidp-ingest-file-to-table; for browsing use aidp-catalog-explore.
ユースケース
- ✓テーブル/ビュー/スキーマ/カタログを作成または削除したい
- ✓外部データソースをカタログとして登録したい
- ✓カタログのメタデータをリフレッシュしたい
- ✓接続をテストしたい
本文(日本語訳)
aidp-table-management — カタログ/スキーマ/テーブル/ビューのライフサイクル管理 + 外部カタログ登録
AIDPカタログのメタデータオブジェクトをコントロールプレーン経由で管理します。
テーブルDDLには2つの同等なパスがあります —
SQLネイティブパス(aidp-sql-ddl、CREATE/ALTER/DROP …)と、
このコントロールプレーンパス(CLI/REST の create-table/create-view/create catalog)です。
加えて、コントロールプレーンのみが提供する機能として、
外部カタログ/接続を永続オブジェクトとして登録する機能があります。
エンジン優先順位: 公式
aidpCLI のcatalog/schemaグループ(推奨)→oci raw-requestREST フォールバック (references/oci-raw-request.md 参照)。--auth api_key --profile DEFAULTを使用してください。 2026-06-10 動作確認済み:GET …/catalogs→ 200、…/schemas?catalogKey=<key>→ 200;…/tables?catalogKey=&schemaKey=および…/views?…→ 400 InvalidParameter (ルートは存在するが、名前ではなく実際のスキーマキーが必要)。
次のような場合に使用
- テーブル、ビュー、スキーマ(ネームスペース)、またはカタログの作成/更新/削除/リフレッシュ。
- 外部カタログ/接続の登録(永続的な EXTERNAL CATALOG オブジェクト)。接続テスト。
- SELECT ではない(→
aidp-analyzing-data); 既存のレイクハウスへのSQL DDLではない(→aidp-sql-ddl); 単発のファイルロードではない(→aidp-ingest-file-to-table); ノートブック単位の一時的なソース読み込みではない (→…-spark-connectorsplugin — 登録済みカタログとは異なるもの)。
クイックリファレンス(CLI動詞 · REST · ボディ)
| オブジェクト | CLI(推奨) | REST フォールバック | 作成ボディ(SDK Create*Details、camelCase) |
|---|---|---|---|
| テーブル | aidp schema create-table|update-table|delete-table|refresh-table |
POST/PUT/DELETE …/tables?catalogKey=&schemaKey= |
{displayName, catalogKey, schemaKey, description, tableType (MANAGED|EXTERNAL), managedTableDefinition|externalTableDefinition, tableFields[], partitionKeys[], tableProperties[]} |
| ビュー | aidp schema create-view|update-view|delete-view |
POST/PUT/DELETE …/views |
{displayName, catalogKey, schemaKey, description, viewText, viewProperties[], viewFields[]} |
| スキーマ | aidp schema create|update|delete|refresh(ネームスペース) |
POST/PUT/DELETE …/schemas |
{displayName, catalogName, description, properties} |
| カタログ | aidp catalog create|update|delete|refresh |
POST/PUT/DELETE …/catalogs |
{displayName, description, catalogType, sourceType, properties, connectionDetails} |
| 接続テスト | aidp catalog test-connection |
POST …/catalogs/actions/testConnection |
接続設定 |
SQLネイティブの同等手段(多くの場合よりシンプル)は aidp-sql-ddl にあります:
CREATE TABLE … USING DELTA / CTAS、CREATE VIEW … AS SELECT、CREATE SCHEMA、DROP …。
ユーザーの好みに応じてどちらを使用しても構いません;
コントロールプレーンの動詞は、SQLでは設定できないオブジェクトのメタデータ/プロパティも設定できます。
外部カタログ/接続の登録
登録済みカタログは永続オブジェクト(catalogType + sourceType + connectionDetails)であり、
connectorsプラグインが扱うノートブック単位の一時的なソース読み込みとは異なります。
手順:
aidp catalog create --display-name … --catalog-type … --source-type … --body @connection.json(またはCreateCatalogDetailsを使用したPOST …/catalogs)。 本番環境に適用する前に、aidp help catalog create/ SDK のCreateConnectionDetailsモデルで 正確なconnectionDetailsの構造を確認し、実際にテストすること — 接続フィールドを手で組み立てないでください。aidp catalog test-connectionで検証後、aidp catalog refreshでメタデータを取得。- オブジェクトストレージベースのテーブルに対するSpark-SQLの代替手段:
CREATE EXTERNAL TABLE … LOCATION 'oci://…'(aidp-sql-ddl経由);oci://上の Iceberg/Delta の読み込み →…-spark-connectors(aidp-iceberg、aidp-object-storage)。
ガードレール
- 変更操作のゲート: create/update/delete/refresh は状態を変更します —
ボディを提示してユーザーに確認を取ってから実行すること(特に
delete-table/delete catalog/drop-schema-CASCADE)。 また.aidp/payloads/に保存すること (references/payloads.md)。 catalogKey/schemaKey(名前ではなく実際のキー)は、事前にaidp-catalog-exploreで解決すること — 有効なキーがないと REST のtables/viewsルートは 400 を返します。- カタログ/スキーマ/テーブル/ビューへの権限付与 →
aidp-roles-access。 - Auto-Populate Catalog Extractor(一括自動カタログ化)は
…/dataLakes/<OCID>/extractorsに REST サーフェスを持ちます (/metadataExtractorsではありません — 404 になります)。 2026-06-12 動作確認済み:GET …/extractors→ 200。 完全なサーフェス(entities/extractedTables/manageExtractedEntities + ライフサイクル)についてはaidp-catalog-initを参照;aidp-catalog-initのディスカバリとaidp-ingest-file-to-tableを補完します。
参照
- aidp-sql-ddl(SQLネイティブDDL) · aidp-catalog-explore(キー解決) · aidp-ingest-file-to-table(ファイルロード) · aidp-roles-access(権限付与)
- references/aidp-cli-map.md · references/oci-raw-request.md · references/rest-endpoint-map.md · references/payloads.md
原文(English)を表示
aidp-table-management — catalog/schema/table/view lifecycle + external-catalog registration
Manage the metadata objects of the AIDP catalog through the control plane. Two equivalent paths for table
DDL — the SQL-native path (aidp-sql-ddl, CREATE/ALTER/DROP …) and this control-plane path
(CLI/REST create-table/create-view/create catalog) — plus the one thing only the control plane does:
registering an external catalog/connection as a persistent object.
Engine precedence: official
aidpCLIcatalog/schemagroups (preferred) →oci raw-requestREST fallback (see references/oci-raw-request.md). Use--auth api_key --profile DEFAULT. Live-verified 2026-06-10:GET …/catalogs→ 200,…/schemas?catalogKey=<key>→ 200;…/tables?catalogKey=&schemaKey=and…/views?…→ 400 InvalidParameter (routes exist, need the real schema key, not the name).
When to use
- Create/update/delete/refresh a table, view, schema (namespace), or catalog.
- Register an external catalog/connection (a persistent EXTERNAL CATALOG object). Test a connection.
- NOT a SELECT (→
aidp-analyzing-data); NOT SQL DDL on an existing lakehouse (→aidp-sql-ddl); NOT a one-off file load (→aidp-ingest-file-to-table); NOT transient per-notebook source reads (→ the…-spark-connectorsplugin — that is a different thing from a registered catalog).
Quick reference (CLI verb · REST · body)
| Object | CLI (preferred) | REST fallback | Create body (SDK Create*Details, camelCase) |
|---|---|---|---|
| Table | aidp schema create-table|update-table|delete-table|refresh-table |
POST/PUT/DELETE …/tables?catalogKey=&schemaKey= |
{displayName, catalogKey, schemaKey, description, tableType (MANAGED|EXTERNAL), managedTableDefinition|externalTableDefinition, tableFields[], partitionKeys[], tableProperties[]} |
| View | aidp schema create-view|update-view|delete-view |
POST/PUT/DELETE …/views |
{displayName, catalogKey, schemaKey, description, viewText, viewProperties[], viewFields[]} |
| Schema | aidp schema create|update|delete|refresh (namespace) |
POST/PUT/DELETE …/schemas |
{displayName, catalogName, description, properties} |
| Catalog | aidp catalog create|update|delete|refresh |
POST/PUT/DELETE …/catalogs |
{displayName, description, catalogType, sourceType, properties, connectionDetails} |
| Test conn. | aidp catalog test-connection |
POST …/catalogs/actions/testConnection |
connection config |
SQL-native equivalents (often simpler) live in aidp-sql-ddl: CREATE TABLE … USING DELTA / CTAS,
CREATE VIEW … AS SELECT, CREATE SCHEMA, DROP …. Use whichever the user prefers; the control-plane verbs
also set object metadata/properties that SQL doesn't.
Register an external catalog/connection
A registered catalog is a persistent object (catalogType + sourceType + connectionDetails), distinct
from the transient per-notebook source reads handled by the connectors plugin. Flow:
aidp catalog create --display-name … --catalog-type … --source-type … --body @connection.json(orPOST …/catalogswithCreateCatalogDetails). Confirm the exactconnectionDetailsshape withaidp help catalog create/ the SDKCreateConnectionDetailsmodel and a live test before production — do not hand-fabricate connection fields.aidp catalog test-connectionto validate, thenaidp catalog refreshto pull metadata.- Spark-SQL alternative for object-storage-backed tables:
CREATE EXTERNAL TABLE … LOCATION 'oci://…'(viaaidp-sql-ddl); Iceberg/Delta-on-oci://reads →…-spark-connectors(aidp-iceberg,aidp-object-storage).
Guardrails
- Mutation gate: create/update/delete/refresh change state — show the body, confirm first (especially
delete-table/delete catalog/drop-schema-CASCADE), and persist to.aidp/payloads/(references/payloads.md). - Resolve
catalogKey/schemaKey(real keys, not names) viaaidp-catalog-explorefirst — the RESTtables/viewsroutes 400 without valid keys. - Grants on these objects (catalog/schema/table/view) →
aidp-roles-access. - Auto-Populate Catalog Extractor (bulk auto-cataloging) has a REST surface at
…/dataLakes/<OCID>/extractors(NOT/metadataExtractors, which 404s). LIVE-VERIFIED 2026-06-12:GET …/extractors→ 200. Seeaidp-catalog-initfor the full surface (entities/extractedTables/manageExtractedEntities + lifecycle); complementsaidp-catalog-initdiscovery +aidp-ingest-file-to-table.
References
- aidp-sql-ddl (SQL-native DDL) · aidp-catalog-explore (resolve keys) · aidp-ingest-file-to-table (file load) · aidp-roles-access (grants)
- references/aidp-cli-map.md · references/oci-raw-request.md · references/rest-endpoint-map.md · references/payloads.md
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。