This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 6efdd3391 [doc] Add the description of Schema Evolution in
cdc-ingestion.md (#1971)
6efdd3391 is described below
commit 6efdd33913cbd14954b057ca1005daf49abcc684
Author: LsomeYeah <[email protected]>
AuthorDate: Fri Sep 8 16:02:53 2023 +0800
[doc] Add the description of Schema Evolution in cdc-ingestion.md (#1971)
---
docs/content/how-to/cdc-ingestion.md | 20 ++++++++++++++++++++
docs/static/img/cdc-ingestion-flinksql.png | Bin 0 -> 353489 bytes
docs/static/img/cdc-ingestion-schema-evolution.png | Bin 0 -> 312401 bytes
3 files changed, 20 insertions(+)
diff --git a/docs/content/how-to/cdc-ingestion.md
b/docs/content/how-to/cdc-ingestion.md
index 217870728..f0ddbfa27 100644
--- a/docs/content/how-to/cdc-ingestion.md
+++ b/docs/content/how-to/cdc-ingestion.md
@@ -39,6 +39,26 @@ We currently support the following sync ways:
6. MongoDB Synchronizing Collection: synchronize one Collection from MongoDB
into one Paimon table.
7. MongoDB Synchronizing Database: synchronize the whole MongoDB database into
one Paimon database.
+
+## What is Schema Evolution
+
+Suppose we have a MySQL table named `tableA`, it has three fields: `field_1`,
`field_2`, `field_3`. When we want to load
+this MySQL table to Paimon, we can do this in Flink SQL, or use
[MySqlSyncTableAction](/docs/{{< param Branch
>}}/api/java/org/apache/paimon/flink/action/cdc/mysql/MySqlSyncTableAction).
+
+**Flink SQL:**
+
+In Flink SQL, if we change the table schema of the MySQL table after the
ingestion, the table schema change will not be synchronized to Paimon.
+
+{{< img src="/img/cdc-ingestion-flinksql.png">}}
+
+**MySqlSyncTableAction:**
+
+In [MySqlSyncTableAction](/docs/{{< param Branch
>}}/api/java/org/apache/paimon/flink/action/cdc/mysql/MySqlSyncTableAction),
+if we change the table schema of the MySQL table after the ingestion, the
table schema change will be synchronized to Paimon,
+and the data of `field_4` which is newly added will be synchronized to Paimon
too.
+
+{{< img src="/img/cdc-ingestion-schema-evolution.png">}}
+
## MySQL
Paimon supports synchronizing changes from different databases using change
data capture (CDC). This feature requires Flink and its [CDC
connectors](https://ververica.github.io/flink-cdc-connectors/).
diff --git a/docs/static/img/cdc-ingestion-flinksql.png
b/docs/static/img/cdc-ingestion-flinksql.png
new file mode 100644
index 000000000..c95771700
Binary files /dev/null and b/docs/static/img/cdc-ingestion-flinksql.png differ
diff --git a/docs/static/img/cdc-ingestion-schema-evolution.png
b/docs/static/img/cdc-ingestion-schema-evolution.png
new file mode 100644
index 000000000..c033c875d
Binary files /dev/null and b/docs/static/img/cdc-ingestion-schema-evolution.png
differ