From 7616ecee78cd4bfa7dbb8387fa531a9679cb76e9 Mon Sep 17 00:00:00 2001 From: yangjf2019 Date: Wed, 8 Jan 2025 10:28:33 +0800 Subject: [PATCH] [hotfix] [doc] Fix some typo and add a three-level catalogue --- docs/content/cdc-ingestion/mysql-cdc.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/content/cdc-ingestion/mysql-cdc.md b/docs/content/cdc-ingestion/mysql-cdc.md index 5567064fadcf..121f58c0ab06 100644 --- a/docs/content/cdc-ingestion/mysql-cdc.md +++ b/docs/content/cdc-ingestion/mysql-cdc.md @@ -52,7 +52,7 @@ To use this feature through `flink run`, run the following shell command. ```bash /bin/flink run \ /path/to/paimon-flink-action-{{< version >}}.jar \ - mysql_sync_table + mysql_sync_table \ --warehouse \ --database \ --table \ @@ -70,7 +70,7 @@ To use this feature through `flink run`, run the following shell command. If the Paimon table you specify does not exist, this action will automatically create the table. Its schema will be derived from all specified MySQL tables. If the Paimon table already exists, its schema will be compared against the schema of all specified MySQL tables. -Example 1: synchronize tables into one Paimon table +### Example 1: synchronize tables into one Paimon table ```bash /bin/flink run \ @@ -97,7 +97,7 @@ Example 1: synchronize tables into one Paimon table As example shows, the mysql_conf's table-name supports regular expressions to monitor multiple tables that satisfy the regular expressions. The schemas of all the tables will be merged into one Paimon table schema. -Example 2: synchronize shards into one Paimon table +### Example 2: synchronize shards into one Paimon table You can also set 'database-name' with a regular expression to capture multiple databases. A typical scenario is that a table 'source_table' is split into database 'source_db1', 'source_db2' ..., then you can synchronize data of all the @@ -134,7 +134,7 @@ To use this feature through `flink run`, run the following shell command. ```bash /bin/flink run \ /path/to/paimon-flink-action-{{< version >}}.jar \ - mysql_sync_database + mysql_sync_database \ --warehouse \ --database \ [--ignore_incompatible ] \ @@ -159,7 +159,7 @@ Only tables with primary keys will be synchronized. For each MySQL table to be synchronized, if the corresponding Paimon table does not exist, this action will automatically create the table. Its schema will be derived from all specified MySQL tables. If the Paimon table already exists, its schema will be compared against the schema of all specified MySQL tables. -Example 1: synchronize entire database +### Example 1: synchronize entire database ```bash /bin/flink run \ @@ -178,7 +178,7 @@ Example 1: synchronize entire database --table_conf sink.parallelism=4 ``` -Example 2: synchronize newly added tables under database +### Example 2: synchronize newly added tables under database Let's say at first a Flink job is synchronizing tables [product, user, address] under database `source_db`. The command to submit the job looks like: @@ -209,7 +209,6 @@ position automatically. The command to recover from previous snapshot and add new tables to synchronize looks like: - ```bash /bin/flink run \ --fromSavepoint savepointPath \ @@ -231,7 +230,7 @@ The command to recover from previous snapshot and add new tables to synchronize You can set `--mode combined` to enable synchronizing newly added tables without restarting job. {{< /hint >}} -Example 3: synchronize and merge multiple shards +### Example 3: synchronize and merge multiple shards Let's say you have multiple database shards `db1`, `db2`, ... and each database has tables `tbl1`, `tbl2`, .... You can synchronize all the `db.+.tbl.+` into tables `test_db.tbl1`, `test_db.tbl2` ... by following command: