Updated on 2024-10-24 GMT+08:00

To MongoDB

If the destination link of a job is a MongoDB link, configure the destination job parameters based on Table 1.

Table 1 Parameter description

Parameter

Description

Example Value

Database Name

Database to which data is to be imported

mddb

Collection Name

Collection of data to be imported, which is similar to the table name of a relational database. Click the icon next to the text box to go to the page for selecting the table or directly enter a table name.

If the desired table is not displayed, check whether the table exists or whether the login account has the permission to query metadata.

COLLECTION

Behavior

Insert operation to be performed during record migration to the MongoDB

  • Insert: Insert file records into a specified set.
  • Insert: Use a specified filter key as the query condition. If a matching record is found in the set, the record is replaced. (If multiple matching records are found, only the first found record is replaced.) Otherwise, the new record will be added.
  • Replace: Use a specified filter key as the query condition. If a matching record is found in the set, the record is replaced. (If multiple matching records are found, only the first found record is replaced.) Otherwise, the new record will not be added.

Add

Prepare for Data Import

MongoDB query statement that needs to be executed before a task is executed

NOTE:
  • The value is a JSON string that contains two key-value pairs. The first key-value pair specifies the operation type. The key is type, and the value can only be remove or drop. The second key-value pair is the name of the data condition or set to be configured for the operation type.
  • The execution of the data import preparation statement does not affect the data to be written.

{"type":"remove","json":"{$or:[{Pid:{$gt:'0',$lt:'2'}},{X:{$gt:'50',$lt:'80'}}]}"}