Skip to content

Adding model classes for data generator#3442

Draft
shreyakhajanchi wants to merge 3 commits intoGoogleCloudPlatform:mainfrom
shreyakhajanchi:data-generator-model
Draft

Adding model classes for data generator#3442
shreyakhajanchi wants to merge 3 commits intoGoogleCloudPlatform:mainfrom
shreyakhajanchi:data-generator-model

Conversation

@shreyakhajanchi
Copy link
Contributor

No description provided.

@shreyakhajanchi shreyakhajanchi added the addition New feature or request label Mar 5, 2026
@gemini-code-assist
Copy link

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 establishes the core data modeling framework for a new data generator template. It provides a structured way to define the schema of a target database, including tables, columns, and various key constraints, along with parameters for data generation. This lays the groundwork for future functionality to generate synthetic data for Spanner and JDBC databases.

Highlights

  • New Data Generator Module: A new Maven module named data-generator has been introduced, providing the foundational structure for a data generation template for Spanner and JDBC.
  • Comprehensive Data Model: A suite of model classes (DataGeneratorColumn, DataGeneratorForeignKey, DataGeneratorSchema, DataGeneratorTable, DataGeneratorUniqueKey) has been added to define database schemas and data generation parameters, including columns, tables, keys, and relationships.
  • Type and Dialect Definitions: New enums LogicalType and SinkDialect were added to standardize the representation of data types for generation and target database dialects (Google Standard SQL, PostgreSQL).
Changelog
  • v2/data-generator/pom.xml
    • Added new Maven project configuration for the data-generator module, including dependencies for Beam, Spanner, JDBC, JSON parsing, and AutoValue.
  • v2/data-generator/src/test/java/com/google/cloud/teleport/v2/templates/model/DataGeneratorColumn.java
    • Added DataGeneratorColumn class to represent a column in the data generator schema, including properties like name, logical type, nullability, size, precision, and scale.
  • v2/data-generator/src/test/java/com/google/cloud/teleport/v2/templates/model/DataGeneratorForeignKey.java
    • Added DataGeneratorForeignKey class to represent a foreign key constraint, specifying the referenced table and columns.
  • v2/data-generator/src/test/java/com/google/cloud/teleport/v2/templates/model/DataGeneratorSchema.java
    • Added DataGeneratorSchema class to represent the overall schema for data generation, containing a map of tables and the target sink dialect.
  • v2/data-generator/src/test/java/com/google/cloud/teleport/v2/templates/model/DataGeneratorTable.java
    • Added DataGeneratorTable class to represent a table in the data generator schema, including its columns, primary keys, foreign keys, unique keys, and data generation parameters like QPS and parent/child relationships.
  • v2/data-generator/src/test/java/com/google/cloud/teleport/v2/templates/model/DataGeneratorUniqueKey.java
    • Added DataGeneratorUniqueKey class to represent a unique key or index, specifying its name and constituent columns.
  • v2/data-generator/src/test/java/com/google/cloud/teleport/v2/templates/model/LogicalType.java
    • Added LogicalType enum to define supported logical data types for generation, such as STRING, INT64, TIMESTAMP, and JSON.
  • v2/data-generator/src/test/java/com/google/cloud/teleport/v2/templates/model/SinkDialect.java
    • Added SinkDialect enum to specify the target database dialect, currently supporting GOOGLE_STANDARD_SQL and POSTGRESQL.
  • v2/data-generator/src/test/java/com/google/cloud/teleport/v2/templates/model/package-info.java
    • Added package-info for the model package, providing a description for data model definitions.
  • v2/data-generator/src/test/java/com/google/cloud/teleport/v2/templates/package-info.java
    • Added package-info for the templates package, providing a description for core Data Generator template classes.
  • v2/pom.xml
    • Included the new data-generator module in the parent pom.xml.
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 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 counter productive. 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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.93%. Comparing base (bea7cea) to head (1d4aa50).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3442      +/-   ##
============================================
+ Coverage     51.88%   51.93%   +0.04%     
+ Complexity     5868     5457     -411     
============================================
  Files          1016     1018       +2     
  Lines         61759    61845      +86     
  Branches       6804     6813       +9     
============================================
+ Hits          32045    32119      +74     
- Misses        27487    27497      +10     
- Partials       2227     2229       +2     
Components Coverage Δ
spanner-templates 71.73% <ø> (+0.05%) ⬆️
spanner-import-export 68.92% <ø> (-0.13%) ⬇️
spanner-live-forward-migration 80.39% <ø> (+0.29%) ⬆️
spanner-live-reverse-replication 77.80% <ø> (+0.28%) ⬆️
spanner-bulk-migration 88.46% <ø> (+0.10%) ⬆️
gcs-spanner-dv 87.02% <ø> (+0.24%) ⬆️
see 14 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.

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/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant