You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/en/connector-v2/sink/MongoDB.md
+3-2
Original file line number
Diff line number
Diff line change
@@ -73,10 +73,11 @@ The following table lists the field data type mapping from MongoDB BSON type to
73
73
| retry.interval | Duration | No | 1000 | Specifies the retry time interval if writing records to database failed, the unit is millisecond. |
74
74
| upsert-enable | Boolean | No | false | Whether to write documents via upsert mode. |
75
75
| primary-key | List | No | - | The primary keys for upsert/update. Keys are in `["id","name",...]` format for properties. |
76
+
| common-options || No | - | Source plugin common parameters, please refer to [Source Common Options](common-options.md) for details |
76
77
77
-
**Tips**
78
+
### Tips
78
79
79
-
> 1.The data flushing logic of the MongoDB Sink Connector is jointly controlled by three parameters: `buffer-flush.max-rows`, `buffer-flush.interval`, and `checkpoint.interval`.
80
+
> 1.The data flushing logic of the MongoDB Sink Connector is jointly controlled by three parameters: `buffer-flush.max-rows`, `buffer-flush.interval`, and `checkpoint.interval`.<br/>
80
81
> Data flushing will be triggered if any of these conditions are met.<br/>
81
82
> 2.Compatible with the historical parameter `upsert-key`. If `upsert-key` is set, please do not set `primary-key`.<br/>
Copy file name to clipboardexpand all lines: docs/en/connector-v2/source/MongoDB.md
+5
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,11 @@ For specific types in MongoDB, we use Extended JSON format to map them to SeaTun
79
79
| fetch.size | Int | No | 2048 | Set the number of documents obtained from the server for each batch. Setting the appropriate batch size can improve query performance and avoid the memory pressure caused by obtaining a large amount of data at one time. |
80
80
| max.time-min | Long | No | 600 | This parameter is a MongoDB query option that limits the maximum execution time for query operations. The value of maxTimeMin is in Minute. If the execution time of the query exceeds the specified time limit, MongoDB will terminate the operation and return an error. |
81
81
| flat.sync-string | Boolean | No | true | By utilizing flatSyncString, only one field attribute value can be set, and the field type must be a String. This operation will perform a string mapping on a single MongoDB data entry. |
82
+
| common-options || No | - | Source plugin common parameters, please refer to [Source Common Options](common-options.md) for details |
83
+
84
+
### Tips
85
+
86
+
> 1.The parameter `match.query` is compatible with the historical old version parameter `matchQuery`, and they are equivalent replacements.<br/>
82
87
83
88
## How to Create a MongoDB Data Synchronization Jobs
Copy file name to clipboardexpand all lines: seatunnel-connectors-v2/connector-mongodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/mongodb/config/MongodbConfig.java
Copy file name to clipboardexpand all lines: seatunnel-connectors-v2/connector-mongodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/mongodb/source/MongodbSource.java
Copy file name to clipboardexpand all lines: seatunnel-e2e/seatunnel-connector-v2-e2e/connector-mongodb-e2e/src/test/java/org/apache/seatunnel/e2e/connector/v2/mongodb/MongodbIT.java
+34
Original file line number
Diff line number
Diff line change
@@ -140,4 +140,38 @@ public void testMongodbSourceSplit(TestContainer container)
0 commit comments