Skip to content

Commit

Permalink
DatastreamToSQL - log schema map details (#1747)
Browse files Browse the repository at this point in the history
* adding logging to test schemmap

* open schemmap prtection

* Handling for String Primary Keys in Bulk Reader. (#1743)

Limitation: For the current PR complete support only upto 3 byte code points.

* Add support for ALO in SpannerChangeStreamsToBigQuery template (#1750)

* Fixing exception in String .isSplittable (#1755)

* Remove PIP_NO_DEPS from YamlTemplate Dockerfile (#1748)

Signed-off-by: Jeffrey Kinard <[email protected]>

* Terraform template updates for custom transformation (#1746)

* terraform changes for end-to-end template

* terraform updates

* formatting fix

* Add string mapper case for IT (#1757)

* Fixing Index Discovery for 5.7 and removing innodb_parallel_read_threads from init sequences for MySql5.7 compliance. (#1758)

* adding schema map to dml handler

* removing logs for testing

* ut for reverse replication shadow tables (#1759)

* ut for reverse replication shadow tables

* incorporated review comments

* unit test for source writer (#1749)

* source writer unit test

* added git configs for new template

* added spanner pr workflow

* added spanner pr workflow

* added spanner pr workflow

* Adding autoReconnect parameters to URL (#1760)

* map should not be static

* merging

* adding logging to test schemmap

* open schemmap prtection

* adding schema map to dml handler

* removing logs for testing

* map should not be static

* linebreaks

---------

Signed-off-by: Jeffrey Kinard <[email protected]>
Co-authored-by: Vardhan Vinay Thigle <[email protected]>
Co-authored-by: Dip Patel <[email protected]>
Co-authored-by: Jeff Kinard <[email protected]>
Co-authored-by: shreyakhajanchi <[email protected]>
Co-authored-by: Deep1998 <[email protected]>
Co-authored-by: aksharauke <[email protected]>
  • Loading branch information
7 people authored Aug 3, 2024
1 parent b4c0c29 commit 7e784de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ public static PipelineResult run(Options options) {
CdcJdbcIO.DataSourceConfiguration dataSourceConfiguration = getDataSourceConfiguration(options);
validateOptions(options, dataSourceConfiguration);
Map<String, String> schemaMap = parseSchemaMap(options.getSchemaMap());
LOG.info("Parsed schema map: {}", schemaMap);

/*
* Stage 1: Ingest and Normalize Data to FailsafeElement with JSON Strings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ public DatastreamToDML getDatastreamToDML() {
String driverName = this.dataSourceConfiguration.getDriverClassName().get();
switch (driverName) {
case "org.postgresql.Driver":
datastreamToDML = DatastreamToPostgresDML.of(dataSourceConfiguration);
datastreamToDML =
DatastreamToPostgresDML.of(dataSourceConfiguration).withSchemaMap(this.schemaMap);
break;
case "com.mysql.cj.jdbc.Driver":
datastreamToDML = DatastreamToMySQLDML.of(dataSourceConfiguration);
datastreamToDML =
DatastreamToMySQLDML.of(dataSourceConfiguration).withSchemaMap(this.schemaMap);
break;
default:
throw new IllegalArgumentException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public abstract class DatastreamToDML
private CdcJdbcIO.DataSourceConfiguration dataSourceConfiguration;
private DataSource dataSource;
public String quoteCharacter;
private static Map<String, String> schemaMap = new HashMap<String, String>();
protected Map<String, String> schemaMap = new HashMap<String, String>();

public abstract String getDefaultQuoteCharacter();

Expand Down

0 comments on commit 7e784de

Please sign in to comment.