From c340c145d411dda1452d3a78120888bfacbab0dd Mon Sep 17 00:00:00 2001 From: xixirangrang <35301108+hfxsd@users.noreply.github.com> Date: Sat, 7 Oct 2023 20:32:25 +0800 Subject: [PATCH 1/2] Update ticdc-sink-to-kafka.md --- ticdc/ticdc-sink-to-kafka.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ticdc/ticdc-sink-to-kafka.md b/ticdc/ticdc-sink-to-kafka.md index bd0e199431552..baa15198e6f1c 100644 --- a/ticdc/ticdc-sink-to-kafka.md +++ b/ticdc/ticdc-sink-to-kafka.md @@ -182,10 +182,10 @@ dispatchers = [ You can use topic = "xxx" to specify a Topic dispatcher and use topic expressions to implement flexible topic dispatching policies. It is recommended that the total number of topics be less than 1000. -The format of the Topic expression is `[prefix]{schema}[middle][{table}][suffix]`. +The format of the Topic expression is `[prefix][{schema}][middle][{table}][suffix]`. - `prefix`: optional. Indicates the prefix of the Topic Name. -- `{schema}`: required. Used to match the schema name. +- `[{schema}]`: optional. Used to match the schema name. - `middle`: optional. Indicates the delimiter between schema name and table name. - `{table}`: optional. Used to match the table name. - `suffix`: optional. Indicates the suffix of the Topic Name. @@ -200,6 +200,8 @@ Some examples: - `matcher = ['test3.*', 'test4.*'], topic = "hello_{schema}_world"` - The data change events corresponding to all tables in `test3` are sent to the topic named `hello_test3_world`. - The data change events corresponding to all tables in `test4` are sent to the topic named `hello_test4_world`. +- `matcher = ['test5.*, 'test6.*'], topic = "hard_code_topic_name` + - The data change events corresponding to all tables in `test5` and `test6` are sent to the topic named `hard_code_topic_name`. You can specify the topic name directly. - `matcher = ['*.*'], topic = "{schema}_{table}"` - All tables listened by TiCDC are dispatched to separate topics according to the "schema_table" rule. For example, for the `test.account` table, TiCDC dispatches its data change log to a Topic named `test_account`. From 5997cbb21c035cb817b12d7f2856d6ad66c8ae15 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Sun, 8 Oct 2023 15:32:11 +0800 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Grace Cai --- ticdc/ticdc-sink-to-kafka.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ticdc/ticdc-sink-to-kafka.md b/ticdc/ticdc-sink-to-kafka.md index baa15198e6f1c..5328a8202468b 100644 --- a/ticdc/ticdc-sink-to-kafka.md +++ b/ticdc/ticdc-sink-to-kafka.md @@ -200,7 +200,7 @@ Some examples: - `matcher = ['test3.*', 'test4.*'], topic = "hello_{schema}_world"` - The data change events corresponding to all tables in `test3` are sent to the topic named `hello_test3_world`. - The data change events corresponding to all tables in `test4` are sent to the topic named `hello_test4_world`. -- `matcher = ['test5.*, 'test6.*'], topic = "hard_code_topic_name` +- `matcher = ['test5.*, 'test6.*'], topic = "hard_code_topic_name"` - The data change events corresponding to all tables in `test5` and `test6` are sent to the topic named `hard_code_topic_name`. You can specify the topic name directly. - `matcher = ['*.*'], topic = "{schema}_{table}"` - All tables listened by TiCDC are dispatched to separate topics according to the "schema_table" rule. For example, for the `test.account` table, TiCDC dispatches its data change log to a Topic named `test_account`.