DBZ-1068 Doc updates, adjusting to renamed option name
This commit is contained in:
parent
98615e5d40
commit
a3dffc1df5
@ -81,6 +81,7 @@ Grant Cooksey
|
||||
Guillaume Rosauro
|
||||
Gunnar Morling
|
||||
Gurnaaz Randhawa
|
||||
Guy Pascarella
|
||||
Grzegorz Kołakowski
|
||||
Jan Hendrik Dolling
|
||||
Hans-Peter Grahsl
|
||||
|
@ -362,7 +362,7 @@ private SqlServerChangeTable[] getCdcTablesToQuery() throws SQLException, Interr
|
||||
SchemaChangeEventType.CREATE));
|
||||
}
|
||||
//
|
||||
// TODO: This needs to be re-worked per https://github.com/debezium/debezium/pull/748#issuecomment-492526200
|
||||
// TODO DBZ-2495: This needs to be re-worked per https://github.com/debezium/debezium/pull/748#issuecomment-492526200
|
||||
//
|
||||
// If a column was renamed, then the old capture instance had been dropped and a new one
|
||||
// created. In consequence, a table with out-dated schema might be assigned here.
|
||||
|
@ -1253,28 +1253,28 @@ record = tableB.get(0);
|
||||
|
||||
@Test
|
||||
@FixFor("DBZ-1068")
|
||||
public void blacklistColumnWhenCaptureInstanceExcludesColumns() throws Exception {
|
||||
public void excludeColumnWhenCaptureInstanceExcludesColumns() throws Exception {
|
||||
connection.execute(
|
||||
"CREATE TABLE blacklist_column_table_a (id int, name varchar(30), amount integer primary key(id))");
|
||||
TestHelper.enableTableCdc(connection, "blacklist_column_table_a", "dbo_blacklist_column_table_a",
|
||||
"CREATE TABLE excluded_column_table_a (id int, name varchar(30), amount integer primary key(id))");
|
||||
TestHelper.enableTableCdc(connection, "excluded_column_table_a", "dbo_excluded_column_table_a",
|
||||
Arrays.asList("id", "name"));
|
||||
|
||||
final Configuration config = TestHelper.defaultConfig()
|
||||
.with(SqlServerConnectorConfig.SNAPSHOT_MODE, SnapshotMode.SCHEMA_ONLY)
|
||||
.with(SqlServerConnectorConfig.COLUMN_BLACKLIST, "dbo.blacklist_column_table_a.amount")
|
||||
.with(SqlServerConnectorConfig.COLUMN_EXCLUDE_LIST, "dbo.excluded_column_table_a.amount")
|
||||
.build();
|
||||
|
||||
start(SqlServerConnector.class, config);
|
||||
assertConnectorIsRunning();
|
||||
|
||||
connection.execute("INSERT INTO blacklist_column_table_a VALUES(10, 'some_name', 120)");
|
||||
connection.execute("INSERT INTO excluded_column_table_a VALUES(10, 'some_name', 120)");
|
||||
|
||||
final SourceRecords records = consumeRecordsByTopic(1);
|
||||
final List<SourceRecord> tableA = records.recordsForTopic("server1.dbo.blacklist_column_table_a");
|
||||
final List<SourceRecord> tableA = records.recordsForTopic("server1.dbo.excluded_column_table_a");
|
||||
|
||||
Schema expectedSchemaA = SchemaBuilder.struct()
|
||||
.optional()
|
||||
.name("server1.dbo.blacklist_column_table_a.Value")
|
||||
.name("server1.dbo.excluded_column_table_a.Value")
|
||||
.field("id", Schema.INT32_SCHEMA)
|
||||
.field("name", Schema.OPTIONAL_STRING_SCHEMA)
|
||||
.build();
|
||||
|
@ -92,6 +92,12 @@ GO
|
||||
----
|
||||
If the result is empty then please make sure that the user has privileges to access both the capture instance and _CDC_ tables.
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
When calling `sys.sp_cdc_enable_table()` with the `captured_column_list` parameter for capturing only a subset of a table's columns,
|
||||
the connector's {link-prefix}:{link-sqlserver-connector}#sqlserver-property-column-exclude-list[column.exclude.list] configuration property must be set accordingly, excluding all non-captured columns.
|
||||
====
|
||||
|
||||
[[sqlserver-on-azure]]
|
||||
=== SQL Server on Azure
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user