hailin0 commented on code in PR #8029:
URL: https://github.com/apache/seatunnel/pull/8029#discussion_r1858545927
##########
docs/en/connector-v2/source/MongoDB-CDC.md:
##########
@@ -213,6 +217,67 @@ sink {
}
```
+## Multi-table Synchronization
+
+The following example demonstrates how to create a data synchronization job
that read the cdc data of multiple library tables mongodb and prints it on the
local client:
+
+```hocon
+env {
+ # You can set engine configuration here
+ parallelism = 1
+ job.mode = "STREAMING"
+ checkpoint.interval = 5000
+}
+
+source {
+ MongoDB-CDC {
+ hosts = "mongo0:27017"
+ database = ["inventory"]
+ collection = ["inventory.products", "inventory.orders"]
+ username = superuser
+ password = superpw
+ tables_configs = [
+ {
+ schema {
+ table = "inventory.products"
+ primaryKey {
+ name = "id"
+ columnNames = ["_id"]
+ }
+ fields {
+ "_id" : string,
+ "name" : string,
+ "description" : string,
+ "weight" : string
+ }
+ }
+ },
+ {
+ schema {
+ table = "inventory.orders"
+ primaryKey {
+ name = "order_number"
+ columnNames = ["order_number"]
+ }
+ fields {
+ "order_number" : int,
+ "order_date" : string,
+ "quantity" : int,
+ "product_id" : string
+ }
+ }
+ }
+ ]
+ }
+}
+
+# Console printing of the read Mongodb data
+sink {
+ Console {
+ parallelism = 1
Review Comment:
```suggestion
```
--
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]