I'm performing CDC for SQL Server but the snapshot.select.statement.overrides only appears to be working for the first table in the list.
Here are my property configurations:
props.setProperty("table.include.list", "dbo.Patients, dbo.Visits, dbo.VisitActivities");
props.setProperty("snapshot.select.statement.overrides", "dbo.Patients, dbo.Visits, dbo.VisitActivities");
props.setProperty("snapshot.select.statement.overrides.dbo.Patients", "SELECT * FROM dbo.Patients WHERE DateCreated > '01/01/2021 00:00:00.000'");
props.setProperty("snapshot.select.statement.overrides.dbo.Visits", "SELECT * FROM dbo.Visits WHERE DateCreated > '01/01/2021 00:00:00.000'");
props.setProperty("snapshot.select.statement.overrides.dbo.VisitActivities", "SELECT * FROM dbo.VisitActivities WHERE ActivityDate > '01/01/2021 00:00:00.000'");
From the application logs, I can verify that the properties are set for the SqlServerConnectorTask. However, when the snapshot selects are performed, the override select statement is only being applied to the first table.
Here is log statement for the first table (dbo.Patients):
2021-04-13 16:49:22,628 INFO || For table 'MMM360DB.dbo.Patients' using select statement: 'SELECT [Patients].[PatientKey],[Patients].[EnterprisePatientKey],[Patients].[FacilityKey],[Patients].[MedicalRecordNumber],[Patients].[DateInterfaced],[Patients].[DateCreated] FROM dbo.Patients WHERE DateCreated > '01/01/2021 00:00:00.000'' [io.debezium.relational.RelationalSnapshotChangeEventSource]
Here is the abbreviated log statement for the other tables (dbo.Visits, dbo.VisitActivities):
2021-04-13 16:49:22,739 INFO || For table 'MMM360DB.dbo.Visits' using select statement: 'SELECT [Visits].[VisitKey],[Visits].[FacilityKey],... FROM [dbo].[Visits]' [io.debezium.relational.RelationalSnapshotChangeEventSource]
2021-04-13 16:49:23,389 INFO || For table 'MMM360DB.dbo.VisitActivities' using select statement: 'SELECT [VisitActivities].[VisitActivityKey],... FROM [dbo].[VisitActivities]' [io.debezium.relational.RelationalSnapshotChangeEventSource]
What am I missing?
Cheers,
Kyley