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

Open
wants to merge 6 commits into
base: 2.4.1
Choose a base branch
from

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

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