OCI Object Storage(Oracle Cloudのデータ保存サービス)にAIDP ノートブックから直接アクセスし、読み書きできるスキルです。`oci://` という特別なアドレス形式を使って操作します。 **次のような場合に使用:** - ユーザーが OCI Object Storage について言及している - 「oci://」という形式でパス指定をしている - 外部ボリュームまたはバケット(データ置き場)内のデータにアクセスしたい - OCI バケットに格納されている CSV・Parquet・JSON・Delta 形式のファイルを扱いたい - データを OCI バケットに保存したい **セキュリティの特徴:** 認証(アクセス権確認)はワークスペースのIAM ID(組織内の身分認証)を通じて自動的に行われるため、ノートブック内にアクセスキーなどの認証情報を記載する必要がありません。
Read and write OCI Object Storage natively from an AIDP notebook using the `oci://` URI scheme. Use when the user mentions OCI Object Storage, "oci://", external volumes, external tables backed by Object Storage, CSV/Parquet/JSON/Delta files in a bucket, or wants to land data in OCI buckets. Auth is implicit via the workspace's IAM identity — no keys in the notebook.
aidp-object-storage — OCI Object Storage ネイティブ対応(oci://)SparkからObject Storageのデータを直接読み書きします。
AIDPクラスターのIAMアイデンティティが自動的に使用されるため、OCI_CONFIG、APIキー、インラインPEMは一切不要です。
/Volumes/...)を登録する。oci:// パスを参照する External Table(USING CSV/PARQUET/...)を定義する。oci://」「Object Storageバケット」「external volume」「external table」というキーワードが登場する。aidp-iceberg を使用。aidp-aws-s3 を使用。aidp-azure-adls を使用。oci://<bucket>@<namespace>/<path>
namespaceとはテナンシーのObject Storageネームスペースを指します (OCI Console > Object Storage > バケット詳細 で確認可能)。
oci_path = "oci://my-bucket@mynamespace/folder/file"
# 書き込み
df.write.mode("overwrite").option("header", True).format("csv").save(oci_path)
# 読み込み
df_read = spark.read.option("header", True).format("csv").load(oci_path)
df_read.show()
format("parquet")、format("json")、format("delta") でも同様のパターンで使用できます。
バケットを一度マウントしておけば、以降はVolumeパスで永続的に参照できます。
CREATE EXTERNAL VOLUME IF NOT EXISTS default.default.ext_volume
LOCATION 'oci://my-bucket@mynamespace/';
登録後の利用:
volume_path = "/Volumes/default/default/ext_volume/folder/file"
df.write.format("csv").option("header", True).save(volume_path)
spark.read.option("header", True).format("csv").load(volume_path).show()
削除する場合: DROP VOLUME default.default.ext_volume
データを oci:// 上に保持するテーブルを登録します。
CREATE TABLE IF NOT EXISTS default.default.ext_table (name STRING, age INT)
USING CSV
OPTIONS (path='oci://my-bucket@mynamespace/folder/file', delimiter=',', header='true');
通常のSparkテーブルと同様にクエリ実行できます:
spark.sql("SELECT * FROM default.default.ext_table").show()
削除する場合: DROP TABLE default.default.ext_table
OCI Console > プロフィール > テナンシー: <tenancy_name> の object_storage_namespace フィールドで確認できます。/Volumes/<catalog>/<schema>/<volume>/...) であり、oci://... ではありません。Volumeを登録した後は、ファイルへのアクセスにはVolumeパスを使用してください。path オプションには oci:// を直接指定します。 Volumeパスではありません。どちらの方式も機能しますが、再マウント可能な抽象化が必要な場合はVolume、シンプルな直接参照で十分な場合はTableを選択してください。/Workspace/... はデータ用ではありません。 ノートブックや設定ファイル向けのFUSEマウントファイルシステムです。データファイルには oci:// または /Volumes/... を使用してください。aidp-object-storage — OCI Object Storage native (oci://)Read and write Object Storage data directly from Spark. The AIDP cluster's IAM identity is used automatically — no OCI_CONFIG, no API keys, no inline PEM.
/Volumes/...) backed by an OCI bucket.USING CSV/PARQUET/...) over an oci:// path.aidp-iceberg.aidp-aws-s3.aidp-azure-adls.oci://<bucket>@<namespace>/<path>
The namespace is the tenancy's Object Storage namespace (OCI Console > Object Storage > Bucket Details).
oci_path = "oci://my-bucket@mynamespace/folder/file"
# Write
df.write.mode("overwrite").option("header", True).format("csv").save(oci_path)
# Read
df_read = spark.read.option("header", True).format("csv").load(oci_path)
df_read.show()
Same pattern with format("parquet"), format("json"), format("delta").
Mount a bucket once, reference by Volume path forever:
CREATE EXTERNAL VOLUME IF NOT EXISTS default.default.ext_volume
LOCATION 'oci://my-bucket@mynamespace/';
Then:
volume_path = "/Volumes/default/default/ext_volume/folder/file"
df.write.format("csv").option("header", True).save(volume_path)
spark.read.option("header", True).format("csv").load(volume_path).show()
Drop with DROP VOLUME default.default.ext_volume.
Register a table whose data lives in oci://:
CREATE TABLE IF NOT EXISTS default.default.ext_table (name STRING, age INT)
USING CSV
OPTIONS (path='oci://my-bucket@mynamespace/folder/file', delimiter=',', header='true');
Query like any Spark table:
spark.sql("SELECT * FROM default.default.ext_table").show()
Drop with DROP TABLE default.default.ext_table.
OCI Console > Profile > Tenancy: <tenancy_name> — the object_storage_namespace field./Volumes/<catalog>/<schema>/<volume>/..., NOT oci://.... Once a volume is registered, address files via the Volume path.path option uses oci:// directly, not the Volume path. Both work; choose based on whether you want a re-mountable abstraction (Volume) or a simple direct reference (Table)./Workspace/... is NOT for data. It's a FUSE-mounted file system intended for notebooks/configs. For data files use oci:// or /Volumes/....原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。