/redpanda:connect-cdc-spannerfrom redpanda
Streams change data capture from Google Cloud Spanner into Redpanda or Kafka using Redpanda Connect's gcp_spanner_cdc input, built on Spanner change streams with partition-aware watermarked delivery.
Ships in redpanda. 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.
Read when SKILL.md points to them.
The gcp_spanner_cdc input in Redpanda Connect streams change data capture (CDC) from a Google Cloud Spanner database into Redpanda or any Kafka-compatible topic. It uses Spanner's native change stream API, tracks multiple concurrent partitions, persists watermark state in a Spanner metadata table, and delivers each row mutation as a JSON message with rich metadata.
Introduced in version 4.56.0. This is an Enterprise feature — a Redpanda Enterprise license is required.
The connector supports both GoogleSQL and PostgreSQL Spanner dialects. It automatically detects the dialect and creates the metadata table in the same database if it does not already exist. Partitions split and merge over time as Spanner scales; the connector handles all partition lifecycle events transparently.
-- Track all tables in the database:
CREATE CHANGE STREAM AllChanges FOR ALL;
-- Or track specific tables:
CREATE CHANGE STREAM OrderChanges FOR orders, customers;
-- Spanner default is OLD_AND_NEW_VALUES; opt into NEW_VALUES to drop old values:
CREATE CHANGE STREAM OrderChanges FOR orders, customers
OPTIONS (value_capture_type = 'NEW_VALUES');
The connector issues a CREATE TABLE IF NOT EXISTS DDL statement on every
startup to create or validate the partition metadata table. This means the
service account must retain DDL permission (spanner.databases.updateDdl)
permanently — not just on first run.
# Create a service account
gcloud iam service-accounts create redpanda-spanner-cdc \
--display-name="Redpanda Spanner CDC"
PROJECT=MY_PROJECT
SA=redpanda-spanner-cdc@${PROJECT}.iam.gserviceaccount.com
# Grant Spanner Database Reader (read data and change streams)
gcloud spanner databases add-iam-policy-binding my-database \
--instance=my-spanner-instance \
--project=${PROJECT} \
--member="serviceAccount:${SA}" \
--role="roles/spanner.databaseReader"
# Grant DDL permission — required on every startup for metadata table setup
gcloud spanner databases add-iam-policy-binding my-database \
--instance=my-spanner-instance \
--project=${PROJECT} \
--member="serviceAccount:${SA}" \
--role="roles/spanner.databaseAdmin"
# Download the JSON key file and base64-encode it for credentials_json
gcloud iam service-accounts keys create spanner-cdc-key.json \
--iam-account=${SA}
export SPANNER_CDC_CREDENTIALS=$(base64 < spanner-cdc-key.json)
# spanner-cdc-pipeline.yaml
input:
label: "spanner_cdc"
gcp_spanner_cdc:
# Base64-encoded service account JSON, or leave empty to use ADC
credentials_json: "${SPANNER_CDC_CREDENTIALS}"
project_id: "my-gcp-project"
instance_id: "my-spanner-instance"
database_id: "my-database"
stream_id: "OrderChanges"
# Optional: start from a specific point in time (RFC3339)
# start_timestamp: "2025-01-01T00:00:00Z"
# Optional: stop at a specific time (RFC3339, exclusive)
# end_timestamp: "2025-12-31T23:59:59Z"
heartbeat_interval: 10s
# metadata_table defaults to: cdc_metadata_OrderChanges
# allowed_mod_types filters to only these operations:
allowed_mod_types:
- INSERT
- UPDATE
- DELETE
batching:
count: 100
period: 1s
output:
redpanda:
seed_brokers:
- "localhost:9092"
topic: '${! meta("table_name") }'
compression: snappy
# Assuming redpanda-connect binary is in PATH (Enterprise build)
redpanda-connect run spanner-cdc-pipeline.yaml
# Or with rpk (Redpanda enterprise)
rpk connect run spanner-cdc-pipeline.yaml
Each emitted message payload is a JSON-serialized Mod object:
{
"keys": { "SingerId": "1" },
"new_values": { "FirstName": "Alice", "LastName": "Smith" },
"old_values": {}
}
Message metadata keys available via meta("..."):
| Key | Description |
|---|---|
table_name | The Spanner table that was mutated |
mod_type | INSERT, UPDATE, or DELETE |
commit_timestamp | Spanner commit timestamp (time.Time); format to a string (e.g. .string()) before writing to a Kafka header |
record_sequence | Sequence within the transaction and partition |
server_transaction_id | Groups all records from the same transaction |
is_last_record_in_transaction_in_partition | Boolean |
value_capture_type | e.g. NEW_VALUES or OLD_AND_NEW_VALUES |
number_of_records_in_transaction | Total records in this transaction |
number_of_partitions_in_transaction | Partitions touched by this transaction |
transaction_tag | Application-defined tag on the Spanner transaction |
is_system_transaction | Boolean — true for Spanner internal transactions |
The connector uses the Spanner Change Stream API, which divides the stream into partitions — each covering an immutable key range for a specific time window. The connector:
cdc_metadata_<stream_id>) to track partition state (CREATED → SCHEDULED → RUNNING → FINISHED) and per-partition watermarks.gcp_spanner_cdc field with type, default, and description — grounded in the source.redpanda.iceberg.mode/delete/invalid.record.action/partition.spec/target.lag.ms); Tiered Storage (redpanda.remote.write/read, cloud_storage_enabled); Cloud Topics (redpanda.cloud_topic.enabled / redpanda.storage.mode=cloud, cloud_topics_enabled); Remote Read Replicas (redpanda.remote.readreplica); Shadowing DR (rpk shadow); the Connect redpanda config-service block, secrets management, allow/deny lists, FIPS; and destination-cluster security (RBAC, OIDC/OAUTHBEARER, Kerberos, Audit Logging, Schema ID Validation). All require an Enterprise license.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
36 skills in this plugin
/adpRedpanda's Agentic Data Plane: governance infrastructure for building, running, and governing AI agents and MCP servers behind a credential-injecting AI Gateway for LLM providers, operated through the `rpk ai` CLI and the ADP UI at ai.redpanda.com. Use when installing `rpk ai`, signing in to an environment, checking setup with `rpk ai doctor`, managing managed or self-managed AI agents and their triggers with `rpk ai agent` and `rpk ai trigger`, configuring remote or managed MCP servers with `rpk ai mcp-server` (including code mode and user-delegated OAuth), setting up LLM providers and models with `rpk ai llm-provider` and `rpk ai model`, applying GitOps manifests, or launching a coding tool with `rpk ai run`. For access policies, budgets and cost, guardrails and the kill switch, or secrets, API keys, data policies and OAuth, see `/redpanda:adp-governance`. For transcripts, the audit log, and traces, see `/redpanda:adp-observability`. For the `rpk cloud mcp` control-plane server, see `/redpanda:rpk-cloud`./adp-governanceGovern what Agentic Data Plane agents may do, spend, and expose, through the `rpk ai` CLI and the ADP UI at ai.redpanda.com, and look up governance features in the Redpanda docs. Use when writing or debugging a Cedar access policy with `rpk ai policy`, giving a new agent access, capping agent spend with `rpk ai budget`, analyzing cost, attaching a guardrail to a provider, containing or releasing an agent with the kill switch, storing or deleting a credential with `rpk ai secret`, minting an API key, masking MCP tool data with data policies, or setting up inbound or outbound OAuth. For signing in, agents, MCP servers, LLM providers, and the rest of the `rpk ai` CLI, see `/redpanda:adp`. For transcripts, the audit log, and traces, see `/redpanda:adp-observability`./adp-observabilityRead what Agentic Data Plane agents did and why, through traces, conversation transcripts, the audit log, and the monitoring views in the ADP UI at ai.redpanda.com and the `rpk ai` CLI. Use when finding which call made an agent run slow, failed, or expensive with `rpk ai trace`, reading or filtering a conversation with `rpk ai agent transcript`, finding conversations with a failed tool call, investigating a denied or masked call with `rpk ai auditlog`, working out on whose behalf an agent acted, or reading the Agent network or Home views. For budgets, cost, and access policies, see `/redpanda:adp-governance`. For signing in, agents, MCP servers, LLM providers, and the rest of the `rpk ai` CLI, see `/redpanda:adp`./cloud-byocProvisions, changes, and tears down Redpanda Cloud BYOC (Bring Your Own Cloud) clusters through the Control Plane API and the `rpk cloud byoc` plugin, where the VPC, IAM roles, and storage stay in your own AWS, GCP, or Azure account. Use when creating or deleting a BYOC cluster or its Network, running `rpk cloud byoc` apply, destroy, or validate, scaling a BYOC cluster, editing its cloud provider tags or cluster properties, configuring its private connectivity and listeners, or setting up Shadow Link disaster recovery, cross-account AWS access, or Enterprise features such as Tiered Storage on it. For workload sizing, see `/redpanda:cloud-byoc-sizing`; for Serverless clusters, see `/redpanda:cloud-serverless`; for fully Redpanda-managed Dedicated clusters, see `/redpanda:cloud-dedicated`./cloud-byoc-sizingEstimates the Redpanda units (RPUs) and the supported broker deployment that a Kafka workload needs on AWS, GCP or Azure, for a single point in time or as a projection over months or quarters, by running a bundled zero-dependency sizing script. Use when sizing or capacity-planning a BYOC cluster from ingress and egress throughput and partition counts; working out how many RPUs or brokers a workload needs and which resource limit drives that number; projecting cluster size and RPU-hours as a workload grows or as new workloads come online; finding the month a growing workload must scale up or outgrows a single cluster; or comparing the sizing of one workload across clouds. For provisioning the cluster once it is sized, see `/redpanda:cloud-byoc`; for fully Redpanda-managed clusters, see `/redpanda:cloud-dedicated`./cloud-dedicatedProvisions and manages Redpanda Cloud Dedicated clusters, the fully Redpanda-managed single-tenant clusters that run in Redpanda's own AWS, GCP, or Azure account, through the Control Plane API and the per-cluster Data Plane API. Use when creating, updating, or deleting a Dedicated cluster or its Network, changing its throughput tier, tags, maintenance window, or cluster properties, configuring public or private connectivity such as PrivateLink or VPC peering, scripting the lifecycle with curl and OAuth2 client credentials, setting up Shadow Link disaster recovery or a Schema Registry migration onto it, or using Enterprise features such as Tiered Storage, Iceberg Topics, and RBAC on it. For Serverless clusters, see `/redpanda:cloud-serverless`; for customer-cloud-account BYOC clusters, see `/redpanda:cloud-byoc`.npx claudepluginhub redpanda-data/skills --plugin redpanda