add-source-cdc-data-generator
Skill1.3k starsChanged 5 months agoApache-2.0View on GitHub
Guide for implementing a database source connector in the v2/cdc-data-generator Dataflow template. Details scope boundaries, prerequisites, connector implementations, factory registrations, unit testing, and smoke testing guidelines.
Trending
More talk lately.about the whole repository
Who's talking about GoogleCloudPlatform/DataflowTemplates
- Stack Overflow“Cloud Pub/Sub to GCS, write per element (Dataflow Pipeline)”Stack Overflow · Jun 22, 2018 · 4 votes
- Stack Overflow“Debugging Dataflow template GCS to BigQuery”Stack Overflow · May 20, 2018 · 4 votes
- Stack Overflow“Dataflow read from a topic PubSub and write to Bigquery (multiples tables)”Stack Overflow · Mar 18, 2020 · 3 votes
- Stack Overflow“Google Dataflow: get job name and start time from the running pipeline itself”Stack Overflow · May 14, 2019 · 3 votes
- Stack Overflow“Is it possible to update existing Google cloud dataflow pipelines when using template for deployment ?”Stack Overflow · Apr 24, 2018 · 3 votes
The biggest 5 of 80 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 80
Talked about on GitHub and Stack Overflow (80 times).
On GitHub · 50
- May 26, 2026Enforce binary-only constraints during early requirements cache attempts — apache/beam1 reaction · 6 comments
- May 21, 2026Revert gcsio 3 upgrades — apache/beam1 reaction · 1 comment
- Oct 15, 2026Add support for zoneinfo UTC timestamps — apache/beam0 reactions · 2 comments
- Oct 8, 2026[Failing Test]: Spanner test timeout blocking release — apache/beam0 reactions · 1 comment
- Oct 2, 2026Link Checker Report — rsamborski/google-skills0 reactions
45 more on GitHub
- Sep 22, 2026Faster canonical BSON type discovery for _id — gsbingo17/mongodb-to-new0 reactions
- Sep 22, 2026docs: update launcher VM phase description — neo4j/docs-dataflow-connector0 reactions · 2 comments
- Jul 7, 2026[Task]: Update mheap version to include Node 24 support — apache/beam0 reactions · 1 comment
- May 8, 2026Enhancing counters for MongoDbToMongoDb template — michaeltle-goog/DataflowTemplates0 reactions
- Apr 24, 2026docs: mention import-spec upgrade — neo4j/docs-dataflow-connector0 reactions · 1 comment
- Jan 30, 2026Spanner is hanging when DCP is enabled — apache/beam0 reactions · 4 comments
- Jan 16, 2026[Bug]: Remove Spanner exclusion once bug is fixed — apache/beam0 reactions · 4 comments
- Jan 16, 2026Fix spanner io hang by closing connections — apache/beam0 reactions · 3 comments
- Jan 15, 2026Pin spanner version, not just spanner bom — apache/beam0 reactions · 2 comments
- Jan 14, 2026Update neo4j resource manager — apache/beam0 reactions · 4 comments
- Jan 14, 2026Revert spanner version — apache/beam0 reactions · 4 comments
- Dec 29, 2025Documentation update on RetryDLQ flow — GoogleCloudPlatform/spanner-migration-tool0 reactions · 1 comment
- Oct 20, 2025Fix BigQueryIO File load validate runtime value provider — apache/beam0 reactions · 2 comments
- Aug 28, 2025update the changes.md for upgrading MongoDB Java driver — apache/beam0 reactions · 1 comment
- Apr 16, 2025[Task]: Add Validates Runner Yaml Suite (or add to existing suites) — apache/beam0 reactions
- Apr 6, 2025Fix flaky test for greedy allocator — SurenSK/alluxio_WLTest0 reactions
- Mar 28, 2025Support Time Partitioned Test Tables in BigqueryResourceManager — apache/beam0 reactions · 3 comments
- Mar 28, 2025[Feature Request]: Support Time Partitioned Test Tables in BigqueryResourceManager — apache/beam0 reactions · 1 comment
- Feb 20, 2025Update SpannerSchema to support postgres tokenlist — apache/beam0 reactions · 2 comments
- Nov 15, 2024[Bug]: Certain nullable type resolved to not null coder after #32705 — apache/beam0 reactions · 8 comments
- Nov 3, 2024Fixing Google DataflowTemplates test — TestingResearchIllinois/idoft0 reactions
- Nov 3, 2024Marking PR opened for DataflowTemplates — TestingResearchIllinois/idoft0 reactions
- Oct 31, 2024Bump Hadoop versions for compatibility test — apache/beam0 reactions · 6 comments
- Oct 24, 2024Adding one Opened GoogleDataflowTemplates pull request — TestingResearchIllinois/idoft0 reactions
- Oct 10, 2024Opened 1 Flink PR and 1 DataflowTemplates PR — TestingResearchIllinois/idoft0 reactions
- Oct 10, 2024Opened a pull request for DataflowTemplates — TestingResearchIllinois/idoft0 reactions
- Sep 13, 2024Bring docs up to date with new spec and features (templates GA) — neo4j/docs-dataflow-connector0 reactions · 1 comment
- Sep 10, 2024Fixed flaky test DataStoreConvertersTest.testCheckSameKey() — mihirgune/DataflowTemplates0 reactions
- Aug 14, 2024[7.3.1] Add a version indicator and selector to all docs pages — bazelbuild/bazel0 reactions
- Aug 1, 2024Handle rc container in _update_container_image_for_dataflow — apache/beam0 reactions · 1 comment
- Jul 5, 2024Fix failing `CodeCov` report — theochem/Selector0 reactions · 1 comment
- Jun 12, 2024Add a version indicator and selector to all docs pages — bazelbuild/bazel0 reactions · 25 comments
- Mar 25, 2024Bring docs up to date with new spec and features — neo4j/docs-dataflow-connector0 reactions · 2 comments
- Mar 13, 2024[Bug] Annotation processor generated duplicated classes from dependency that also used autovalue — google/auto0 reactions · 3 comments
- Mar 12, 2024[Bug]: hamcrest required in class path in 2.55.0 — apache/beam0 reactions · 9 comments
- Feb 8, 2024[Bug]: DualInputNestedValueProvider is not able to get Value properly if input is RuntimeValueProvider. — apache/beam0 reactions · 4 comments
- Feb 3, 2024[Task]: Reverse it component migration — apache/beam0 reactions · 1 comment
- Nov 13, 2023[Bug]: Can not use Avro over 1.8.2 with Beam 2.52.0 — apache/beam0 reactions · 6 comments
- Oct 27, 2023The project DataflowTemplates can't be parsed when opened by VSCode from WSL — redhat-developer/vscode-java0 reactions
- Aug 20, 2023Increase Elasticsearch wait time from 1 to 2 minutes, make it configurable — testcontainers/testcontainers-java0 reactions · 4 comments
- Aug 3, 2023Intermittent `Stream closed` exception after upgrading to 1.10.2 — google/auto0 reactions · 16 comments
- Jun 5, 2023[Bug]: Possible data loss in BigtableIO r/w if timestamp not set (default to epoch) — apache/beam0 reactions · 9 comments
- Jan 26, 2023[Task]: Migrate DataflowTemplates integration test utilities to Apache Beam repository — apache/beam0 reactions · 3 comments
- Jul 6, 2022Introduce support for RECORD type in TextIOToBigQuery template — chmurakrajowa/OChKDataflowTemplates0 reactions
- Jun 10, 2022Add OutputProject option to PubSubCDC etc. — 1st-penguin/DataflowTemplates0 reactions
On Stack Overflow · 30
- Jun 22, 2018Cloud Pub/Sub to GCS, write per element (Dataflow Pipeline)4 votes · 3 answers
- May 20, 2018Debugging Dataflow template GCS to BigQuery4 votes
- Mar 18, 2020Dataflow read from a topic PubSub and write to Bigquery (multiples tables)3 votes · 1 answer
- May 14, 2019Google Dataflow: get job name and start time from the running pipeline itself3 votes
- Apr 24, 2018Is it possible to update existing Google cloud dataflow pipelines when using template for deployment ?3 votes
25 more on Stack Overflow
- Apr 26, 2023Can a google dataflow spanner to big query change stream be configured to only watch/post Inserts and ignore all updates/deletes2 votes
- Jan 9, 2023How to concate Two ValueProvider and assign it to new ValueProvider?2 votes
- Mar 17, 2022Consumer wrongly ignoring already consumed messages2 votes
- Nov 18, 2021Is there a version of Apache Beam that can read JSON from Google Spanner?2 votes
- Aug 9, 2021Is there a way to match avro schema with Bigquery and Bigtable?2 votes
- May 21, 2020Using performance.now() in Dataflow Javascript UDF2 votes
- Apr 12, 2019Error when building this GCP Dataflow sample for Pubsub to Bigquery streaming2 votes · 2 answers
- Feb 11, 2019Exporting data from a table in spanner to GCS cloud storage2 votes
- Nov 27, 2018Is there a way to customize Google provided Cloud Dataflow templates?2 votes
- May 22, 2018Skipping records in Dataflow JavaScript UDF2 votes
- Feb 21, 2018Cloud Dataflow: How to use Google-provided Templates for PubSub to BigQuery2 votes
- Aug 3, 2023How to convert a JsonObject into an Avro Generic Record?1 vote
- Apr 18, 2022ApacheBeam ElasticsearchIO is not working with latest elasticsearch1 vote
- Sep 1, 2021Flex Template Release Notes1 vote
- Feb 1, 2021Using Google Dataflow template, is there simple way to whitelist all tables in a Database instead of passing a comma separated list of all the tables1 vote · 1 answer
- Oct 7, 2020Can Dataflow CDC be used for initial dump too?1 vote · 1 answer
- Apr 29, 2020Google Cloud Platform - Dataflow doesn't decrypt data with KMS key1 vote · 1 answer
- Dec 17, 2019Dataflow: string to pubsub message1 vote
- Jan 22, 2019Unable to run GCP DataflowTemplates locally1 vote · 1 answer
- Oct 2, 2018Google Data Flow Template1 vote
- Dec 5, 2022Encryption/Decryption of Bigdata using apache beam0 votes
- Apr 29, 2021Comparing objects using PAssert containsInAnyOrder in Apache Beam0 votes
- Jan 6, 2021Dataflow batch template provided by google does not work0 votes · 1 answer
- Sep 17, 2020Read the data from Google Cloud Sql to BigQuery using Clud Dataflow0 votes · 1 answer
- May 20, 2019Defining TableSchema in PubSubToBigQuery template0 votes
In this repository13 other files it gives its agents.
- v2/gcs-spanner-dv/AGENTS.mdAGENTS.md
- smt-e2e-dataflow-debuggingSkill
- smt-functional-testingSkill
- add-integ-tests-datastream-to-spannerSkill
- add-source-datastream-to-spannerSkill
- add-integ-tests-gcs-spanner-dvSkill
- add-integ-tests-sourcedb-to-spannerSkill
- add-source-sourcedb-to-spannerSkill
- add-source-datatype-integ-testSkill
- add-source-functional-integ-testSkill
- meta-test-orchestratorSkill
- add-integ-tests-spanner-to-sourcedbSkill
- add-source-spanner-to-sourcedbSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Datatype Mapping File: Ask the user to provide or point to the Datatype Mapping Matrix for the new source database, defining the supported …
- Distinctive: line 24
Test Setup Details: Ask the user for the test environment details required for smoke testing, including:
- Distinctive: line 31
All implementation for a new source connector MUST be strictly confined to:
- Very specific: line 62
Add the new source to SinkType and @TemplateParameter.Enum in CdcDataGeneratorOptions.java:
- Very specific: line 66
Add the source-specific constants in Constants.java (v2/cdc-data-generator), update v2/spanner-common if needed, and add any required …
- Very specific: line 77
All unit tests must pass with BUILD SUCCESS.
- Distinctive: line 95
If any CRUD operation fails to write or produces DLQ records or data discrepancies in the database, inspect error logs and DLQ payloads, …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: Implement Source in CDC Data Generator Template
Overview
This skill provides a step-by-step procedure for adding support for a new database source connector to the v2/cdc-data-generator template. It details prerequisites, scope boundaries, type mapping requirements, connector implementation, factory registration, unit testing, and smoke testing procedures.
Prerequisites
[!CRITICAL] MANDATORY PREREQUISITE GATE: Before running code searches, inspecting files, or executing unit tests, you MUST verify if the user provided the inputs below. If any required input is missing, STOP IMMEDIATELY and ask the user for clarification before proceeding further.
- Datatype Mapping File: Ask the user to provide or point to the Datatype Mapping Matrix for the new source database, defining the supported source database datatypes and their corresponding target mappings.
- Test Setup Details: Ask the user for the test environment details required for smoke testing, including:
- Source Database Instance details (host/instance name, port, database/service name, credentials/connection method, and schema/namespace if applicable).
- Shard configuration / sink options details and GCP project / staging GCS bucket information.
Architectural Boundaries & Code Scope
All implementation for a new source connector MUST be strictly confined to:
- Source Connector Package:
v2/cdc-data-generator/src/main/java/com/google/cloud/teleport/v2/source/<source_type>/- Implementation of
ISourceConnector(<Source>SourceConnector.java) - Source-specific config, schema fetcher, type mapper, and data writer classes in package
<source_type>(inspect and implement similar to existing source packages such asv2/cdc-data-generator/src/main/java/com/google/cloud/teleport/v2/source/mysql/).
- Implementation of
- Connector Factory:
SourceConnectorFactory.java(v2/cdc-data-generator/src/main/java/com/google/cloud/teleport/v2/source/SourceConnectorFactory.java)- Dynamic connector lookup in
getSourceConnector(SinkType)andgetSourceConnectorBySourceType(String).
- Dynamic connector lookup in
- Pipeline Options & Constants:
CdcDataGeneratorOptions.java(v2/cdc-data-generator/src/main/java/com/google/cloud/teleport/v2/templates/CdcDataGeneratorOptions.java) forSinkTypeenum and@TemplateParameter.Enumregistration.Constants.java(v2/cdc-data-generator/src/main/java/com/google/cloud/teleport/v2/templates/utils/Constants.java) andv2/cdc-data-generator/pom.xml(if a driver dependency is required).
- Shared Core Schema Scanners & Utilities:
v2/spanner-common- Schema scanner and shared utilities in
v2/spanner-common(updated similar to existing sources).
- Schema scanner and shared utilities in
Datatype Mapping Matrix Requirements
Consult the Datatype Mapping Matrix provided in the prerequisites to verify correct datatype conversion between the source database datatypes and LogicalType. Ensure proper alignment for character, numeric, temporal, binary, boolean, JSON, and any other dialect-specific datatypes as specified in the mapping file.
Step-by-Step Implementation Workflow
Step 0: Mandatory Prerequisite Gate
- Verify Inputs: Inspect the request for the required inputs. If the Datatype Mapping Matrix and Test Setup Details are not provided in the user request, DO NOT run any inspection or execution tools. Stop and ask the user for the missing details first.
Step 1: Implement <Source>SourceConnector
Implement ISourceConnector (<Source>SourceConnector.java) in com.google.cloud.teleport.v2.source.<source_type> by inspecting the files in existing source packages (e.g., com.google.cloud.teleport.v2.source.mysql) and implementing all methods of ISourceConnector similarly for the new source.
Step 2: Implement Source Support Classes
Inspect all files in the existing source connector packages (such as v2/cdc-data-generator/src/main/java/com/google/cloud/teleport/v2/source/mysql/) and implement the corresponding sink config, schema fetcher, type mapper, and data writer classes in com.google.cloud.teleport.v2.source.<source_type> for the new database source. Ensure all supported types from the Datatype Mapping Matrix are covered.
Step 3: Register Source in Options, Constants & Factory
- Add the new source to
SinkTypeand@TemplateParameter.EnuminCdcDataGeneratorOptions.java:@TemplateParameter.TemplateEnumOption("<SOURCE>") - Add the source-specific constants in
Constants.java(v2/cdc-data-generator), updatev2/spanner-commonif needed, and add any required driver dependency tov2/cdc-data-generator/pom.xml. - Register the connector in
SourceConnectorFactory.java:- Update
getSourceConnector(SinkType) - Update
getSourceConnectorBySourceType(String)
- Update
Step 4: Unit Testing & Verification
Inspect the existing unit tests in v2/cdc-data-generator/src/test/java/com/google/cloud/teleport/v2/source/, write the corresponding unit tests for the new source, and execute Maven unit tests for the template:
mvn test -pl v2/cdc-data-generator \
-Dtest=<Source>*Test,SourceConnectorFactoryTestAll unit tests must pass with BUILD SUCCESS.
Step 5: Mandatory Live Smoke Testing & Verification
[!CRITICAL] MANDATORY EXECUTION REQUIREMENT: Immediately after unit tests pass, you MUST AUTOMATICALLY PROCEED to execute live end-to-end smoke testing using the test environment details provided in the prerequisites. Do NOT stop, pause, or declare completion after unit testing without running the live smoke tests.
- Environment & Schema Setup:
- Connect to the database instance configured in the test setup and create test tables covering all supported datatypes from the Datatype Mapping Matrix.
- Upload the sink options configuration file to GCS.
- Perform Live Data Generation (INSERT, UPDATE, DELETE):
- Launch the
cdc-data-generatorDataflow pipeline withsinkType=<SOURCE>and non-zeroinsertQps,updateQps, anddeleteQps.
- Launch the
- Verify Generation Flow:
- Monitor the pipeline execution and DLQ directory to ensure zero
writeFailuresorgenerationFailures. - Query the target database tables directly to confirm that
INSERT,UPDATE, andDELETEoperations are accurately executed across all supported datatypes.
- Monitor the pipeline execution and DLQ directory to ensure zero
- Retry Loop on Failure:
- If any CRUD operation fails to write or produces DLQ records or data discrepancies in the database, inspect error logs and DLQ payloads, modify the source connector classes, rebuild, and re-test until all operations pass cleanly.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

