Skip to content

Cassandra DML Generator - Spanner to SourceDB#2120

Merged
shreyakhajanchi merged 27 commits intoGoogleCloudPlatform:mainfrom
ollionorg:cassandra_dml_generator_pr
Jan 23, 2025
Merged

Cassandra DML Generator - Spanner to SourceDB#2120
shreyakhajanchi merged 27 commits intoGoogleCloudPlatform:mainfrom
ollionorg:cassandra_dml_generator_pr

Conversation

@taherkl
Copy link
Copy Markdown
Contributor

@taherkl taherkl commented Jan 8, 2025

Implement CassandraDMLGenerator for Generating Cassandra-Specific DML Statements

Description:
This PR introduces the CassandraDMLGenerator class, which implements the IDMLGenerator interface to handle the generation of Cassandra-specific Data Manipulation Language (DML) statements. The primary features and enhancements included in this implementation are as follows:

Key Features:

  • DML Generation Support:
    • Implements the getDMLStatement method to construct Cassandra-compatible DML statements (e.g., INSERT, UPDATE, DELETE, and UPSERT).
    • Validates and maps input data against the schema to ensure correct column names and data types.
  • Flexible Data Handling:
    • Supports primary key and non-primary key handling for both insert and update operations.
    • Includes mechanisms for handling complex data types and converting them to Cassandra-compatible formats.
  • Timestamp Management:
    • Adds support for appending USING TIMESTAMP in queries, leveraging precise control over data consistency in Cassandra.
  • Robust Error Handling:
    • Includes logging for unknown options, invalid data types, and schema mismatches.
    • Throws appropriate exceptions for unsupported configurations and invalid inputs.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants