yuxiqian commented on code in PR #4614: URL: https://github.com/apache/flink-cdc/pull/4614#discussion_r4476389636
########## docs/i18n/zh/docusaurus-plugin-content-docs/current/docs/examples-and-best-practices/migrate-paimon-cdc-action.md: ########## @@ -0,0 +1,398 @@ +--- +title: "从 Paimon MySQL CDC Action 迁移到 Flink CDC" +slug: "/docs/examples-and-best-practices/migrate-paimon-cdc-action" +sidebar_position: 8 +hide_title: true +displayed_sidebar: docs +--- +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +# 从 Paimon MySQL CDC Action 迁移到 Flink CDC + +本文介绍如何把 Apache Paimon MySQL CDC Action 的配置改写成 Apache Flink CDC YAML Pipeline,涵盖以下两种场景: + +| 原 Action | Flink CDC Pipeline | +|-----------|--------------------| +| `mysql_sync_table` | 读取一张或多张 MySQL 表,路由到指定的 Paimon 表。 | +| `mysql_sync_database` | 筛选 MySQL 表,分别路由到 Paimon 数据库中的表,并按需添加表名前后缀。 | + +示例保留源端主键,使用 filesystem Catalog。 +迁移前请结合原作业 Action JAR 支持的参数,查阅 +[Paimon MySQL CDC 文档](https://paimon.apache.org/docs/master/cdc-ingestion/mysql-cdc/)。 + +:::warning + +Paimon Action 的 Checkpoint 或 Savepoint 不能用于恢复 Flink CDC Pipeline。 +示例从全量快照开始,写入独立的 `lake_migration` 数据库。 +复用已有目标表时,请参见[继续写入已有目标表](#继续写入已有目标表)。 + +::: + +## 准备环境 + +根据下表选择配套的发行包和依赖,CDC 下载链接使用 3.7.0。 +使用 SNAPSHOT 版本时,从同一源码版本构建发行包和 Pipeline 连接器, +请参见[安装 Flink CDC](../deployment/standalone.md#set-up-flink-cdc)。 + +| Flink 发行包 | 所需依赖 | 可选的 SQL 验证连接器 | +|--------------|----------|----------------------| +| [Flink 1.20.5](https://archive.apache.org/dist/flink/flink-1.20.5/flink-1.20.5-bin-scala_2.12.tgz) | [Flink CDC 3.7.0](https://archive.apache.org/dist/flink/flink-cdc-3.7.0/flink-cdc-3.7.0-1.20-bin.tar.gz)<br />[MySQL Pipeline 连接器](https://repo.maven.apache.org/maven2/org/apache/flink/flink-cdc-pipeline-connector-mysql/3.7.0-1.20/flink-cdc-pipeline-connector-mysql-3.7.0-1.20.jar)<br />[Paimon Pipeline 连接器](https://repo.maven.apache.org/maven2/org/apache/flink/flink-cdc-pipeline-connector-paimon/3.7.0-1.20/flink-cdc-pipeline-connector-paimon-3.7.0-1.20.jar)<br />[MySQL JDBC 8.0.27](https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/8.0.27/mysql-connector-java-8.0.27.jar)<br />[Hadoop 2.8.3-10.0](https://repo.maven.apache.org/maven2/org/apache/flink/flink-shaded-hadoop-2-uber/2.8.3-10.0/flink-shaded-hadoop-2-uber-2.8.3-10.0.jar) | [面向 Flink 1.20 的 Paimon SQL 2.0.0](https://repo.maven.apache.org/maven2/org/apache/paimon/paimon-flink-1.20/2.0.0/paimon-fl ink-1.20-2.0.0.jar) | Review Comment: Suggestion: use ``@@VERSION@@`` variable to create correct download link based on docs version -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
