Skip to content

[Part 2/2] Add Oracle data writer and source connector registration in cdc-data-generator - #4504

Merged
bharadwaj-aditya merged 5 commits into
GoogleCloudPlatform:mainfrom
bharadwaj-aditya:oracle_cdc_data_generator_writer_and_connector
Nov 5, 2026
Merged

bharadwaj-aditya merged 5 commits into
GoogleCloudPlatform:mainfrom
bharadwaj-aditya:oracle_cdc_data_generator_writer_and_connector

Conversation

@bharadwaj-aditya

Copy link
Copy Markdown
Contributor

Part 2 of 2 for adding Oracle support in v2/cdc-data-generator (stacked on #4500):\n- Adds OracleDataWriter for batched JDBC MERGE upserts and DELETE operations across Oracle shards.\n- Adds OracleSourceConnector and registers ORACLE in SourceConnectorFactory and CdcDataGeneratorOptions.\n- Includes unit tests for OracleDataWriter, OracleSourceConnector, and SourceConnectorFactory.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request completes the implementation of Oracle support for the v2/cdc-data-generator. It introduces the necessary infrastructure to connect to, scan, and write data to Oracle databases, including batched JDBC MERGE operations for efficient upserts and deletes. The changes also include comprehensive unit tests for the new components.

Highlights

  • Oracle Connector Implementation: Added OracleDataWriter, OracleSourceConnector, and OracleSchemaFetcher to support Oracle databases in the CDC data generator.
  • Oracle Configuration and Registration: Registered the ORACLE sink type in SourceConnectorFactory and CdcDataGeneratorOptions, and added necessary Oracle JDBC dependencies to the project.
  • Schema Scanning Improvements: Enhanced OracleInformationSchemaScanner to support schema-specific scanning, improved primary key and index detection, and added robust type mapping for Oracle-specific data types.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces Oracle database support to the CDC Data Generator. It adds the necessary Oracle JDBC dependencies, implements the Oracle source connector, schema fetcher, type mapper, and data writer, and extends the existing OracleInformationSchemaScanner to extract comprehensive schema metadata. Comprehensive unit tests are also added to validate these new components. The reviewer identified a high-severity issue in OracleDataWriter where generated primary key columns are excluded from writableColumns but still referenced in the MERGE statement's ON clause, which would cause an ORA-00904 compilation error in Oracle. A code suggestion was provided to ensure primary key columns are retained in writableColumns even if marked as generated.

@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.28571% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.21%. Comparing base (36d4c6c) to head (9c17f2f).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...leport/v2/source/oracle/OracleSourceConnector.java 95.45% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4504      +/-   ##
============================================
+ Coverage     57.05%   57.21%   +0.16%     
+ Complexity     8143     7821     -322     
============================================
  Files          1167     1169       +2     
  Lines         74470    74763     +293     
  Branches       8810     8865      +55     
============================================
+ Hits          42486    42777     +291     
- Misses        29144    29145       +1     
- Partials       2840     2841       +1     
Components Coverage Δ
spanner-templates 84.00% <ø> (+<0.01%) ⬆️
spanner-import-export 72.20% <ø> (-0.11%) ⬇️
spanner-live-forward-migration 87.64% <ø> (+<0.01%) ⬆️
spanner-live-reverse-replication 79.84% <ø> (+<0.01%) ⬆️
spanner-bulk-migration 88.29% <ø> (+<0.01%) ⬆️
gcs-spanner-dv 86.55% <ø> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
...oud/teleport/v2/source/SourceConnectorFactory.java 90.47% <100.00%> (+11.52%) ⬆️
...ud/teleport/v2/source/oracle/OracleDataWriter.java 100.00% <100.00%> (ø)
...teleport/v2/templates/CdcDataGeneratorOptions.java 100.00% <100.00%> (ø)
...leport/v2/source/oracle/OracleSourceConnector.java 95.45% <95.45%> (ø)

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bharadwaj-aditya
bharadwaj-aditya force-pushed the oracle_cdc_data_generator_writer_and_connector branch 3 times, most recently from d2e9929 to db8390c Compare November 3, 2026 03:46
@bharadwaj-aditya bharadwaj-aditya added the addition New feature or request label Nov 3, 2026
@bharadwaj-aditya
bharadwaj-aditya force-pushed the oracle_cdc_data_generator_writer_and_connector branch from db8390c to eb3e761 Compare November 3, 2026 08:14
@bharadwaj-aditya bharadwaj-aditya changed the title [DO NOT REVIEW] [Part 2/2] Add Oracle data writer and source connector registration in cdc-data-generator [Part 2/2] Add Oracle data writer and source connector registration in cdc-data-generator Nov 3, 2026
@bharadwaj-aditya
bharadwaj-aditya force-pushed the oracle_cdc_data_generator_writer_and_connector branch from 2c02740 to 6e7b114 Compare November 3, 2026 17:58
dhwanilpatel
dhwanilpatel previously approved these changes Nov 4, 2026

@dhwanilpatel dhwanilpatel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just minor comment.

@shreyakhajanchi shreyakhajanchi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall

dhwanilpatel
dhwanilpatel previously approved these changes Nov 4, 2026
@bharadwaj-aditya
bharadwaj-aditya merged commit c8992a1 into GoogleCloudPlatform:main Nov 5, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addition New feature or request size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants