Bug Description
When using the clickhouse.database.override.map configuration, the connector should map the source database name to a new target database name. However, when enable.snapshot.ddl is set to "true", the connector parses and executes the DDL statements from the initial snapshot using the source database name, rather than the mapped target database name. As a result, the DDL statements are executed on the source database instead of the intended target database.
Steps to Reproduce
Configure clickhouse.database.override.map to map the source database name to a new target database name.
Set enable.snapshot.ddl to "true" to enable DDL parsing and execution during the initial snapshot.
Observe that the DDL statements are executed using the source database name rather than the target database name specified in clickhouse.database.override.map.
Expected Behavior
The DDL statements should use the target database name specified in clickhouse.database.override.map, ensuring that all DDL operations are executed in the target database.
Actual Behavior
The DDL statements are executed using the source database name, which leads to incorrect execution in the wrong database.
Relevant Code
The issue seems to be related to the DDL execution logic in DebeziumChangeEventCapture.java, line 143. The logic does not correctly apply the mapped target database name during DDL execution.
Environment
Version: [2.3.1]
Configuration: clickhouse.database.override.map and enable.snapshot.ddl set to "true"
Additional Context
This issue prevents the connector from correctly executing DDL in the desired target database when overriding database names, which limits the usefulness of the clickhouse.database.override.map configuration.
Please let me know if you need any further information or if I can assist with testing a potential fix.
Bug Description When using the
clickhouse.database.override.map
configuration, the connector should map the source database name to a new target database name. However, whenenable.snapshot.ddl
is set to "true", the connector parses and executes the DDL statements from the initial snapshot using the source database name, rather than the mapped target database name. As a result, the DDL statements are executed on the source database instead of the intended target database.Steps to Reproduce
clickhouse.database.override.map
to map the source database name to a new target database name.enable.snapshot.ddl
to "true" to enable DDL parsing and execution during the initial snapshot.clickhouse.database.override.map
.Expected Behavior The DDL statements should use the target database name specified in
clickhouse.database.override.map
, ensuring that all DDL operations are executed in the target database.Actual Behavior The DDL statements are executed using the source database name, which leads to incorrect execution in the wrong database.
Relevant Code The issue seems to be related to the DDL execution logic in DebeziumChangeEventCapture.java, line 143. The logic does not correctly apply the mapped target database name during DDL execution.
Environment
clickhouse.database.override.map
andenable.snapshot.ddl
set to "true"Additional Context This issue prevents the connector from correctly executing DDL in the desired target database when overriding database names, which limits the usefulness of the
clickhouse.database.override.map
configuration.Please let me know if you need any further information or if I can assist with testing a potential fix.