Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

895 ignore ddl based on regex #896

Merged
merged 6 commits into from
Nov 22, 2024
Merged

Conversation

subkanthi
Copy link
Collaborator

closes: #895

@subkanthi
Copy link
Collaborator Author

subkanthi commented Nov 5, 2024

Add to config.yml

#ignore.ddl.regex: If set, the connector will ignore DDL events that match the regex.
ignore.ddl.regex: "(?i)(ANALYZE PARTITION).*"

Tested:
MySQL:

CREATE TABLE sales (     id INT NOT NULL,     sale_date DATE NOT NULL,     amount DECIMAL(10, 2),     PRIMARY KEY (id, sale_date) ) PARTITION BY RANGE (YEAR(sale_date)) (     PARTITION p2020 VALUES LESS THAN (2021),     PARTITION p2021 VALUES LESS THAN (2022),     PARTITION p2022 VALUES LESS THAN (2023),     PARTITION pfuture VALUES LESS THAN MAXVALUE );

alter table sales analyze partition p2022;
clickhouse-sink-connector-lt_1  | 2024-11-05 02:02:32.685 INFO  - Ignoring DDL: alter table sales analyze partition p2022 as it matches the regex: (?i)(ANALYZE PARTITION).*
clickhouse-sink-connector-lt_1  | 2024-11-05 02:02:32.685 INFO  - Ignored Source DB DDL: alter table sales analyze partition p2022 Snapshot:false

@subkanthi subkanthi merged commit 0978481 into 2.4.1 Nov 22, 2024
6 of 7 checks passed
@subkanthi subkanthi deleted the 895-ignore-ddl-based-on-regex branch November 22, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant