JNSimba commented on code in PR #3767:
URL: https://github.com/apache/flink-cdc/pull/3767#discussion_r2029852676
##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/debezium/task/MySqlSnapshotSplitReadTask.java:
##########
@@ -109,6 +117,21 @@ public MySqlSnapshotSplitReadTask(
this.snapshotChangeEventSourceMetrics =
snapshotChangeEventSourceMetrics;
this.hooks = hooks;
this.isBackfillSkipped = isBackfillSkipped;
+
+ // setting column filter
+ String columnIncludeList =
+
sourceConfig.getDbzConfiguration().getString(COLUMN_INCLUDE_LIST);
+ String columnExcludeList =
+
sourceConfig.getDbzConfiguration().getString(COLUMN_EXCLUDE_LIST);
+ if (columnIncludeList != null) {
+ this.columnFilter =
+ Tables.ColumnNameFilterFactory.createIncludeListFilter(
+ columnIncludeList, ColumnFilterMode.CATALOG);
+ } else {
+ this.columnFilter =
+ Tables.ColumnNameFilterFactory.createExcludeListFilter(
+ columnExcludeList, ColumnFilterMode.CATALOG);
+ }
Review Comment:
This will only take effect in the snapshot phase, because MySQL's binlog
cannot be configured to capture partial columns. In the incremental phase,
projection can be used to query partial columns.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]