Hello! I tried searching the docs and messages her...
# troubleshooting
s
Hello! I tried searching the docs and messages here but I couldn't find anything so I was hoping someone may have solved this already but I am attempting to pass snapshot override queries to the debezium connector for the SqlServerSourceBuilder via the JavaAPI like this:
Copy code
Properties 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!
I tried using the older non-incremental source e.g. `
Copy code
SourceFunctionString 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?