Sean McAdams
01/27/2025, 5:55 PMProperties debeziumProperties = new Properties();
debeziumProperties.setProperty("snapshot.select.statement.overrides", "dbo.xxxxxxx");
debeziumProperties.setProperty("snapshot.select.statement.overrides.dbo.xxxxxxx", "SELECT * FROM dbo.xxxxxxx WHERE SomeId IN (123, 456)");
SqlServerIncrementalSourceString sqlServerSource = new SqlServerSourceBuilder()
.hostname("yyyyyyyyyyyyyy")
.port(1433)
.databaseList("MyDB")
.tableList("dbo.xxxxxxx")
.username("SomeUser")
.password("SomePass")
.debeziumProperties(debeziumProperties)
.deserializer(new JsonDebeziumDeserializationSchema())
.startupOptions(StartupOptions.initial())
.build();
But it doesn't seem to be working and it is still sending the default snapshot queries it uses during the split process. Am I potentially missing something?
I tried a stand alone debezium setup and passed the same properties and it behaved as expected so the property values seem correct. Also tried bumping the taskmanager logging to DEBUG for debezium classes and also haven't seen anything suspicious yet.
Any advice would be appreciated!Sean McAdams
01/27/2025, 8:26 PMSourceFunctionString sourceFunction = SqlServerSource.Stringbuilder()
And it works the way I expect. Diving deeper into the way the incremental source works it looks like it is overriding the default snapshotting query with the split logic in the org.apache.flink.cdc.connectors.sqlserver.source.reader.fetch.SqlServerScanFetchTask And doesn't seem to provide a way to control that as far as I can see. Has anyone tried controlling the split query logic for the incremental sources?