/oracle-ai-data-platform-workbench-spark-connectors:aidp-streaming-kafkafrom oracle-ai-data-platform-workbench-spark-connectors
Consumes OCI Streaming (Kafka-compat) streams in AIDP notebooks via Spark structured streaming with SASL/PLAIN auth using an OCI auth token.
Ships in oracle-ai-data-platform-workbench-spark-connectors. 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-streaming-kafka — OCI Streaming via Spark structured streamingMirrors the official Oracle AIDP sample at oracle-samples/oracle-aidp-samples → data-engineering/ingestion/Streaming/StreamingFromOCIStreamingService.ipynb.
spark.read.format("csv"|"parquet").load("oci://...") is fine without this skill.bootstrap.servers at the right broker and skip the OCI-specific username format.spark-sql-kafka-0-10_<scala>:<spark> — AIDP's tpcds cluster has this).sys.path./Volumes/<catalog>/<schema>/<volume>/_checkpoints/...). Do NOT use /Workspace/... — the streaming engine fails silently. The helper's validate_checkpoint_path() raises a clear ValueError if you try.import os
from oracle_ai_data_platform_connectors.streaming import (
bootstrap_for_region, build_kafka_options_sasl_plain,
validate_checkpoint_path,
)
# Bootstrap. Either generic-regional (default) or cell-prefixed (matches OCI
# Console's "messages-endpoint" shape — pick whichever your stream pool shows):
bootstrap = bootstrap_for_region(os.environ["OCI_REGION"]) # streaming.<region>...:9092
# bootstrap = bootstrap_for_region(os.environ["OCI_REGION"], cell=1) # cell-1.streaming.<region>...:9092
opts = build_kafka_options_sasl_plain(
bootstrap_servers=bootstrap,
tenancy_name=os.environ["OCI_TENANCY_NAME"], # display name, NOT OCID
username=os.environ["OCI_USERNAME"], # OCI user; for IAM-Domains
# use "oracleidentitycloudservice/<email>"
stream_pool_ocid=os.environ["OCI_STREAM_POOL_OCID"],
auth_token=os.environ["OCI_AUTH_TOKEN"], # 1h TTL — refresh before long jobs
topic=os.environ["KAFKA_TOPIC"],
starting_offsets="latest", # or "earliest" for backfill
# Optional tuning (matches the official sample):
max_partition_fetch_bytes=1024 * 1024,
max_offsets_per_trigger=5, # cap rows per micro-batch (demo-friendly)
)
raw = spark.readStream.format("kafka").options(**opts).load()
# Validate checkpoint path BEFORE starting (saves you from silent FUSE failures)
checkpoint = validate_checkpoint_path(os.environ["KAFKA_CHECKPOINT_VOLUME"])
sink_path = os.environ["KAFKA_SINK_VOLUME"] # e.g. /Volumes/default/default/streaming/kafkaStreamingSink
# Match the official sample: write to a Delta sink under /Volumes/.
query = (
raw.writeStream
.queryName("OCIStreamingSource")
.format("delta")
.option("checkpointLocation", checkpoint)
.start(sink_path)
)
query.awaitTermination(timeout=120)
print("input rows in last batch:", (query.lastProgress or {}).get("numInputRows"))
For an inline test against an existing topic with print-style output:
out_df = raw.selectExpr("CAST(key AS STRING) AS k", "CAST(value AS STRING) AS v",
"topic", "partition", "offset")
q = (out_df.writeStream.format("memory").queryName("kafka_test")
.option("checkpointLocation", checkpoint)
.trigger(processingTime="5 seconds").start())
q.awaitTermination(timeout=60)
spark.sql("SELECT * FROM kafka_test").show()
q.stop()
OCI Streaming's Kafka SASL username is <tenancy_name>/<user>/<stream_pool_ocid>. The middle segment depends on tenancy type:
| Tenancy | username argument |
|---|---|
| Legacy IAM | <email> |
| IAM Domains (modern) | oracleidentitycloudservice/<email> |
If you oci iam user list shows the user with oracleidentitycloudservice/... prefix, use the prefixed form.
/Volumes/.... The validate_checkpoint_path() helper raises a ValueError if you pass /Workspace/... or oci://.... This is the #1 cause of "stream runs but no data appears" complaints in AIDP.com.oracle.bmc.auth.sasl.ResourcePrincipalsLoginModule) is blocked at the AIDP platform level (RP tokens not provided).oracleidentitycloudservice/ prefix.Max Concurrent Runs = 1 on the wrapping job.https://cell-1.streaming.<region>.oci.oraclecloud.com. Either form (streaming.<region>... or cell-N.streaming.<region>...) works for the Kafka layer.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
29 skills in this plugin
/aidp-alhConnect from an AIDP notebook to Oracle AI Lakehouse (ALH), Autonomous Data Warehouse (ADW), or Autonomous Transaction Processing (ATP). Prefer the AIDP `aidataplatform` Spark format handler for wallet/password and catalog.id paths (`ORACLE_ALH` / `ORACLE_ATP`), but use raw Spark JDBC for IAM DB-token because the AIDP connector does not support DB-token auth yet./aidp-aws-s3Read and write AWS S3 (`s3a://`) from an AIDP notebook. Use when the user mentions S3, AWS S3 bucket, s3a, or has AWS access keys. Auth is access key + secret key via the Hadoop S3A connector. boto3 is also available for non-Spark management operations (list, copy)./aidp-azure-adlsRead and write Azure Data Lake Storage Gen2 (`abfss://`) from an AIDP notebook. Use when the user mentions ADLS, Azure Data Lake, abfss, or wants to ingest from a multi-cloud Azure source. Auth is OAuth client-credentials (Service Principal client_id + secret + tenant)./aidp-azuresqlRead or write Azure SQL Database from an AIDP notebook through the AIDP `aidataplatform` Spark format handler. Use when the user mentions Azure SQL, Azure SQL Database, AZURE_SQLSERVER, or a database.windows.net endpoint. Auth is SQL username/password./aidp-connectors-bootstrapFirst-time setup. Use when the user wants to install/upload the AIDP Spark connectors helper package into their AIDP workspace, or has just installed this plugin and asks "how do I set it up", "first-time setup", "install the helpers", "bootstrap aidp connectors". Drives the AIDP MCP tools to push the helper package to /Workspace/Shared/ and runs a sanity import./aidp-connectors-overviewHelp the user pick the right connector skill for their data source from an AIDP notebook. Use as a router when the user mentions multiple sources, isn't sure which connector applies, or asks "how do I connect to X from AIDP". Covers 27 data sources — Oracle Autonomous DB family (ALH/ADW/ATP), generic Oracle DB, ExaCS, PeopleSoft, Siebel, Fusion ERP/BICC, EPM Cloud, Essbase, OCI Streaming, Object Storage, Iceberg, plus PostgreSQL, MySQL/HeatWave, Db2, SQL Server, Azure SQL, Hive, Snowflake, Google BigQuery, Azure ADLS, AWS S3, Salesforce, NetSuite, generic REST, custom JDBC, Excel.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-spark-connectors-ai-claude-code-plugins-oracle-ai-data-platform-workbench-spark-connectorsOther plugins' skills for the same job