confluentinc/agent-skills/confluent-cloud-cdc-tableflow
Claude Code and agent skill by confluentinc/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Set up end-to-end Change Data Capture (CDC) pipelines on Confluent Cloud using Debezium source connectors, Flink for transformation, and Tableflow for data lake integration. Supports JSON_SR, Avro, and Protobuf formats. Handles schemaless topics (plain JSON without SR) and multi-event topics. This skill handles the complete workflow from database to Iceberg/Delta tables. Use this skill when users want to capture database changes and materialize them into Iceberg or Delta Lake tables via Conflue…
Install
npx vskill@latest install confluentinc/agent-skills/confluent-cloud-cdc-tableflowSKILL.md
Confluent Cloud CDC to Tableflow Pipeline
Build production-ready Change Data Capture pipelines that stream database changes through Confluent Cloud to Iceberg or Delta Lake tables using Debezium, Flink, and Tableflow.
Overview
This skill automates the setup of a complete CDC pipeline:
Database → Debezium CDC Connector → Kafka + Schema Registry → Flink (decode & transform) → Tableflow → Iceberg/Delta Tables
Supported Databases (Fully-Managed Debezium Connectors Only)
- Microsoft SQL Server CDC Source V2
- MySQL CDC Source V2
- PostgreSQL CDC Source V2
- Oracle XStream CDC Source
- DynamoDB CDC Source
Key Components
- Debezium CDC Source Connector: Captures database changes as events
- Schema Registry: Manages Avro/JSON/Protobuf schemas (default: JSON_SR)
- Confluent Cloud Flink: Decodes Debezium envelopes and transforms data
- Tableflow: Native Confluent Cloud feature that materializes Kafka topics as Iceberg or Delta tables
Critical Architecture Rules
1. NEVER enable Tableflow directly on CDC source topics.
Always use the Flink decode pattern: CDC Source Topic → Flink INSERT → Target Topic (changelog.mode = 'upsert') → Tableflow.
CDC connectors with tombstones.on.delete=true produce null-value Kafka records (tombstones) on DELETE operations. If Tableflow is enabled directly on the CDC source topic, it will use APPEND mode by default and immediately suspend when it encounters a tombstone: "Tableflow will be suspended because we detected a Kafka record with a null value."
The Flink decode layer solves this by interpreting Debezium CDC semantics natively — it translates DELETEs into proper retract/tombstone messages that upsert-mode Tableflow handles correctly.
Do NOT use `after.state.only=true` as a shortcut to bypass the Flink decode step. While it strips the Debezium envelope, tombstone records from DELETEs still break APPEND-mode Tableflow. Additionally, OracleXStreamSource does not support the after.state.only configuration option at all.
2. Tableflow changelog mode is IMMUTABLE after first materialization.
Tableflow caches the changelog mode (APPEND or UPSERT) when it first materializes data. Once set, it cannot be changed — even by altering the Kafka topic's changelog.mode property or by deleting and recreating the Tableflow topic. The S3 table_path is keyed by Kafka topic name, so recreating a Tableflow topic reuses the same S3 path and cached state.
Attempting to change the mode causes: "The changelog mode for this topic has been modified since table materialization began." Flip-flopping the mode further corrupts state with: "Incompatible schema evolution detected."
To change changelog mode, you must delete the Tableflow topic, delete the underlying Kafka topic, and recreate both from scratch. This is why it's critical to create target topics with 'changelog.mode' = 'upsert' from the start.
3. Pipeline cleanup order matters.
When resetting a CDC-to-Tableflow pipeline, delete resources in this order:
- Tableflow topics (on target topics)
- Flink INSERT statements
- Flink target tables (DROP TABLE)
- Target Kafka topics
- CDC connectors
- CDC source Kafka topics (including dbhistory/schema-changes topics)
- All associated schemas from Schema Registry (both
-keyand-valuesubjects)
Never delete CDC source Kafka topics while the connector is still running — the connector cannot recover or re-snapshot and must be fully recreated.
Important Clarifications
- Tableflow is NOT a connector. It is a native topic-level feature enabled via the Tableflow API or Confluent Cloud UI.
- Confluent Cloud Flink auto-discovers CDC tables. You do NOT need to manually create source tables — topics with Schema Registry schemas are automatically available as Flink tables.
- Topics without SR schemas can still be handled — register a JSON schema (partial is fine), use schema inference, or use Flink's raw BYTES with JSON functions. See
references/connector-configs.md"Handling Topics Without Schema Registry". - All SR-backed formats work identically —
JSON_SR,AVRO, andPROTOBUFall support Flink auto-discovery and Tableflow. Choose based on throughput needs vs. debuggability. - Managed connectors use `output.data.format`, not
key.converter/value.converterclasses.
Workflow Phases
Phase 0: Tool Selection & MCP Server Validation (CRITICAL)
Default: Use Confluent MCP Server. The MCP server is the preferred method for all Confluent Cloud operations. Only fall back to the Confluent CLI (confluent command) and REST APIs if the MCP server is not installed or unavailable.
0.1 Verify MCP Server Availability
Check for mcp__confluent__* tools (list-environments, create-connector, create-flink-statement, create-tableflow-topic, list-schemas, list-topics, consume-messages, search-topics-by-name).
If MCP is not available, fall back to the Confluent CLI (confluent command) and REST APIs for all operations. The CLI fallback should mirror the same workflow phases but use CLI commands instead of MCP tool calls.
CLI Fallback Examples:
REST API Fallback: If neither MCP nor CLI is available, use the Confluent Cloud REST APIs directly. All calls use HTTP Basic Auth with a Cloud API Key (not a Kafka API key). See references/rest-api.md for endpoint patterns and examples.
0.2 Gather Confluent Cloud Details from the User
Ask the user to provide the following Confluent Cloud details:
| Detail | Example | Used For | |
|---|---|---|---|
| Environment ID | env-0ypxv6 | environmentId in all MCP calls | |
| Kafka Cluster ID | lkc-qo5k36 | clusterId in all MCP calls | |
| Flink Compute Pool ID | lfcp-3v39xw | computePoolId in Flink statements | |
| Flink Catalog Name | my_environment | catalogName in Flink statements | |
| Flink Database Name | cluster_0 | databaseName in Flink statements |
Credentials: Generate a cdc-credentials.properties file with placeholders for: Kafka API Key/Secret (cluster-scoped), Database Username/Password. Have the user populate it in their editor and add it to .gitignore. If the user prefers Claude not read the file, fall back to CLI: generate connector-config.json with placeholders, user fills it in, then confluent connect cluster create --config-file connector-config.json.
0.3 Verify MCP Cluster Targeting
Quick verification:
- Run
mcp__confluent__list-topicsto confirm the MCP server is connected to the expected cluster - Run
mcp__confluent__list-schemasto verify Schema Registry is accessible
Schema Registry is shared at the environment level across all clusters.
Phase 1: Discovery & Validation
1.1 Check Existing Setup
Use MCP to check what already exists:
Ask the user:
- "Do you have any CDC connectors already running?"
- "Do you have a Flink compute pool you'd like to use, or should I create one?"
- "Is your database already configured for CDC?"
1.2 Validate Topic Prefix Uniqueness
Before proceeding, validate that the chosen topic.prefix won't collide with existing topics:
Or via CLI:
If any existing topics share the proposed prefix, warn the user and recommend a unique prefix. A prefix collision silently merges CDC data with unrelated topics, which can corrupt both pipelines.
1.3 Check Schema Registry Compatibility
Default BACKWARD compatibility can halt CDC connectors when database columns are dropped. Set FULL_TRANSITIVE for CDC subjects after the connector creates them:
1.4 Gather Required Information
Database Configuration:
- Database type (SQL Server, MySQL, PostgreSQL, Oracle, or DynamoDB)
- Connection details (hostname, port, database name)
- Credentials (populated by the user in the credentials file)
- Specific tables to capture (format:
schema.table)
Schema Format: Ask the user: JSON_SR (default, human-readable), AVRO (smaller payloads, high-throughput), or PROTOBUF (strongly typed). All work identically with Flink auto-discovery and Tableflow. Never use plain `JSON` — it breaks both. See references/connector-configs.md for detailed comparison.
Existing Topics Without SR: See references/connector-configs.md "Handling Topics Without Schema Registry" for options (register JSON schema, schema inference, or Flink raw BYTES).
Tableflow Destination:
- Target format: Iceberg or Delta Lake
- Storage: Managed (recommended, Confluent manages S3) or BYOB (user's own S3 bucket, requires Provider Integration ID)
Naming Convention:
- Default:
cdc-pipeline-skill-{database-type}-{YYYYMMDD} - Example:
cdc-pipeline-skill-postgres-20260323
1.5 Validate Database Prerequisites
Each database requires specific CDC setup. Read references/database-prerequisites.md for details:
- PostgreSQL: WAL level = logical, replication slots, publication
- MySQL: binlog format = ROW, GTID mode
- SQL Server: CDC enabled on database and tables, SQL Server Agent running
- Oracle XStream: GoldenGate replication enabled (`enable_goldengate_replication=TRUE`), ARCHIVELOG mode, supplemental logging, XStream admin user with `DBMS_XSTREAM_AUTH` privileges, XStream outbound server created via `DBMS_XSTREAM_ADM.CREATE_OUTBOUND`, connector user with XStream connect privilege. Full prereqs: https://docs.confluent.io/cloud/current/connectors/cc-oracle-xstream-cdc-source/prereqs-validation.md
- DynamoDB: Streams enabled with NEW_AND_OLD_IMAGES
If the database isn't properly configured, guide the user through setup before proceeding.
Oracle XStream important limitations:
- Only supports non-CDB architecture on Amazon RDS for Oracle
- Does NOT support Oracle Autonomous Databases or Oracle Standby (Data Guard)
- Does NOT support Downstream Capture
after.state.onlyis NOT supported byOracleXStreamSource- Requires a valid Confluent license for XStream Out
Phase 2: Planning
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/confluent-cloud-cdc-tableflow/SKILL.md
Popularity
- Repository stars
- 60
- Repository forks
- 11
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/confluentinc/agent-skills/confluent-cloud-cdc-tableflow)