leonardBang commented on code in PR #3153:
URL: https://github.com/apache/flink-cdc/pull/3153#discussion_r1527763427
##########
docs/content/docs/core-concept/data-pipeline.md:
##########
@@ -23,3 +23,80 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
+
+# Definition
+Since events in Flink CDC flow from the upstream to the downstream in a
pipeline manner, the data synchronization task is also referred as a Data
Pipeline.
Review Comment:
we can use **Data Pipeline** to highlight
##########
docs/content/docs/core-concept/route.md:
##########
@@ -23,3 +23,52 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
+
+# Definition
+Route specifies the rule of matching a list of source-table and mapping to
sink-table. The most typical scenario is the merge of sub-databases and
sub-tables, routing multiple upstream source tables to the same sink table.
+
+# Parameters
+To describe a route, the follows are required:
+
+| parameter | meaning |
+|-----------------------|--------------------------|
+| source-table | Source table id, supports regular expressions |
+| sink-table | Sink table id, supports regular expressions |
+| description | Routing rule description(optional, default
value provided) |
+
+A route module can contain a list of source-table/sink-table rules.
+
+# Example
+## one to one
+if synchronize the table `web_order` in the database `mydb` to a Doris table
`ods_web_order`, we can use this yaml file to define this route:
+
+```yaml
+route:
+ source-table: mydb.web_order
+ sink-table: mydb.ods_web_order
+ description: sync table to one destination table with given prefix ods_
+```
+
+## many to one
Review Comment:
Route multiple Data Source tables to one Data Sink table
##########
docs/content/docs/core-concept/data-pipeline.md:
##########
@@ -23,3 +23,80 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
+
+# Definition
+Since events in Flink CDC flow from the upstream to the downstream in a
pipeline manner, the data synchronization task is also referred as a Data
Pipeline.
+
+# Parameters
+A pipeline corresponds to a chain of operators in Flink.
+To describe a Data Pipeline, the following parts are required:
+- [source](data-source.md)
+- [sink](data-sink.md)
+- [pipeline](data-pipeline.md#global-parameters) (global parameters)
+
+the following parts are optional:
+- [route](route.md)
+- [transform](transform.md)
+
+# Example
+## Only required
+We could use this concise yaml file to define a pipeline:
+
+```yaml
+ source:
+ type: mysql
+ hostname: localhost
+ port: 3306
+ username: root
+ password: 123456
+ tables: app_db.\.*
+
+ sink:
+ type: doris
+ fenodes: 127.0.0.1:8030
+ username: root
+ password: ""
+
+ pipeline:
+ name: Sync MySQL Database to Doris
+ parallelism: 2
+```
+
+## With optional
+We could use this complicated yaml file to define a pipeline:
+
+```yaml
+ source:
+ type: mysql
+ hostname: localhost
+ port: 3306
+ username: root
+ password: 123456
+ tables: app_db.\.*
+
+ sink:
+ type: doris
+ fenodes: 127.0.0.1:8030
+ username: root
+ password: ""
+ route:
+ - source-table: app_db.orders
+ sink-table: ods_db.ods_orders
+ - source-table: app_db.shipments
+ sink-table: ods_db.ods_shipments
+ - source-table: app_db.products
+ sink-table: ods_db.ods_products
+
+ pipeline:
+ name: Sync MySQL Database to Doris
+ parallelism: 2
+```
+
+# Global Parameters
+The following parameters are global parameters of the pipeline:
Review Comment:
The following config options of Data Pipeline level are supported:
##########
docs/content/docs/core-concept/data-pipeline.md:
##########
@@ -23,3 +23,80 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
+
+# Definition
+Since events in Flink CDC flow from the upstream to the downstream in a
pipeline manner, the data synchronization task is also referred as a Data
Pipeline.
Review Comment:
the data synchronization task -> the whole ETL task is referred as a **
Data Pipeline **
##########
docs/content/docs/core-concept/route.md:
##########
@@ -23,3 +23,52 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
+
+# Definition
+Route specifies the rule of matching a list of source-table and mapping to
sink-table. The most typical scenario is the merge of sub-databases and
sub-tables, routing multiple upstream source tables to the same sink table.
+
+# Parameters
+To describe a route, the follows are required:
+
+| parameter | meaning |
+|-----------------------|--------------------------|
+| source-table | Source table id, supports regular expressions |
+| sink-table | Sink table id, supports regular expressions |
+| description | Routing rule description(optional, default
value provided) |
+
+A route module can contain a list of source-table/sink-table rules.
+
+# Example
+## one to one
Review Comment:
Route one Data Source table to one Data Sink table
##########
docs/content/docs/core-concept/data-pipeline.md:
##########
@@ -23,3 +23,80 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
+
+# Definition
+Since events in Flink CDC flow from the upstream to the downstream in a
pipeline manner, the data synchronization task is also referred as a Data
Pipeline.
+
+# Parameters
+A pipeline corresponds to a chain of operators in Flink.
+To describe a Data Pipeline, the following parts are required:
+- [source](data-source.md)
+- [sink](data-sink.md)
+- [pipeline](data-pipeline.md#global-parameters) (global parameters)
+
+the following parts are optional:
+- [route](route.md)
+- [transform](transform.md)
+
+# Example
+## Only required
+We could use this concise yaml file to define a pipeline:
Review Comment:
```suggestion
We could use following yaml file to define a concise Data Pipeline
describing synchronize all tables under MySQL app_db database to Doris :
```
##########
docs/content/docs/core-concept/data-pipeline.md:
##########
@@ -23,3 +23,80 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
+
+# Definition
+Since events in Flink CDC flow from the upstream to the downstream in a
pipeline manner, the data synchronization task is also referred as a Data
Pipeline.
+
+# Parameters
+A pipeline corresponds to a chain of operators in Flink.
+To describe a Data Pipeline, the following parts are required:
+- [source](data-source.md)
+- [sink](data-sink.md)
+- [pipeline](data-pipeline.md#global-parameters) (global parameters)
+
+the following parts are optional:
+- [route](route.md)
+- [transform](transform.md)
+
+# Example
+## Only required
+We could use this concise yaml file to define a pipeline:
+
+```yaml
+ source:
+ type: mysql
+ hostname: localhost
+ port: 3306
+ username: root
+ password: 123456
+ tables: app_db.\.*
+
+ sink:
+ type: doris
+ fenodes: 127.0.0.1:8030
+ username: root
+ password: ""
+
+ pipeline:
+ name: Sync MySQL Database to Doris
+ parallelism: 2
+```
+
+## With optional
+We could use this complicated yaml file to define a pipeline:
Review Comment:
We could use following yaml file to define a complicated Data Pipeline
describing synchronize all tables under MySQL app_db database to Doris and give
specific target database name `ods_db` and specific target table name prefix
`ods_` :
##########
docs/content/docs/core-concept/data-pipeline.md:
##########
@@ -23,3 +23,80 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
+
+# Definition
+Since events in Flink CDC flow from the upstream to the downstream in a
pipeline manner, the data synchronization task is also referred as a Data
Pipeline.
+
+# Parameters
+A pipeline corresponds to a chain of operators in Flink.
+To describe a Data Pipeline, the following parts are required:
+- [source](data-source.md)
+- [sink](data-sink.md)
+- [pipeline](data-pipeline.md#global-parameters) (global parameters)
+
+the following parts are optional:
+- [route](route.md)
+- [transform](transform.md)
+
+# Example
+## Only required
+We could use this concise yaml file to define a pipeline:
+
+```yaml
+ source:
+ type: mysql
+ hostname: localhost
+ port: 3306
+ username: root
+ password: 123456
+ tables: app_db.\.*
+
+ sink:
+ type: doris
+ fenodes: 127.0.0.1:8030
+ username: root
+ password: ""
+
+ pipeline:
+ name: Sync MySQL Database to Doris
+ parallelism: 2
+```
+
+## With optional
+We could use this complicated yaml file to define a pipeline:
+
+```yaml
+ source:
+ type: mysql
+ hostname: localhost
+ port: 3306
+ username: root
+ password: 123456
+ tables: app_db.\.*
+
+ sink:
+ type: doris
+ fenodes: 127.0.0.1:8030
+ username: root
+ password: ""
+ route:
+ - source-table: app_db.orders
+ sink-table: ods_db.ods_orders
+ - source-table: app_db.shipments
+ sink-table: ods_db.ods_shipments
+ - source-table: app_db.products
+ sink-table: ods_db.ods_products
+
+ pipeline:
+ name: Sync MySQL Database to Doris
+ parallelism: 2
+```
+
+# Global Parameters
Review Comment:
Pipeline Configurations
##########
docs/content/docs/core-concept/data-sink.md:
##########
@@ -23,3 +23,28 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
+
+# Definition
+The Data Sink is used to apply schema changes and write change data to
external systems.
+A Data Sink can write to multiple tables simultaneously.
+
+# Parameters
+To describe a data sink, the follows are required:
+
+| parameter | meaning
|
+|-----------------------------|----------------------------------------------------------------------------------------|
+| type | The type of the sink, such as doris or
starrocks. |
+| name | The name of the sink, which is user-defined
(optional, with a default value provided). |
Review Comment:
add a `optional/required` column for the table?
##########
docs/content/docs/core-concept/route.md:
##########
@@ -23,3 +23,52 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
+
+# Definition
+Route specifies the rule of matching a list of source-table and mapping to
sink-table. The most typical scenario is the merge of sub-databases and
sub-tables, routing multiple upstream source tables to the same sink table.
+
+# Parameters
+To describe a route, the follows are required:
+
+| parameter | meaning |
+|-----------------------|--------------------------|
+| source-table | Source table id, supports regular expressions |
+| sink-table | Sink table id, supports regular expressions |
+| description | Routing rule description(optional, default
value provided) |
+
+A route module can contain a list of source-table/sink-table rules.
+
+# Example
+## one to one
+if synchronize the table `web_order` in the database `mydb` to a Doris table
`ods_web_order`, we can use this yaml file to define this route:
+
+```yaml
+route:
+ source-table: mydb.web_order
+ sink-table: mydb.ods_web_order
+ description: sync table to one destination table with given prefix ods_
+```
+
+## many to one
+What's more, if you want to synchronize the sharding tables in the database
`mydb` to a Doris table `ods_web_order`, we can use this yaml file to define
this route:
+```yaml
+route:
+ source-table: mydb\.*
+ sink-table: mydb.ods_web_order
+ description: sync sharding tables to one destination table
+```
+
+## many rules
Review Comment:
Complex Route via combining route rules
--
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]