Property | Description |
---|---|
Connection | Name of the MongoDB V2 connection that is associated with a dataset. You can select an existing connection or create a new connection. You can also click New Parameter to define a parameter for the target connection. |
Target Type | Type of the target object. Select one of the following options:
|
Object | Name of the MongoDB V2 target object based on the target type selected. |
Existing | You can select an existing MongoDB V2 target table to write data. When you use an existing target, you can select one of the following schema options:
|
Create New at Runtime | Creates a MongoDB V2 target table at runtime based on the target table you specify. To create a target table at runtime, enter the name of the target table that you want to create in the Object Name field. The agent creates the target table based on the object name and the path you specify. You can edit the metadata of the source fields before creating the target. When you create a new target at run time and the target already exists, the mapping appends the data to the existing target. |
Operation | Type of the target operation. Select from one of the following operations:
Default is Insert. |
Update Columns | The primary key column to update, upsert, or delete data in a MongoDB target. This property appears when you select Update, Delete, Upsert, or Data Driven as the operation type. If you do not specify a primary key column, the mapping considers the target column that you configured as the primary key column to update, upsert, or delete data. |
Data Driven Condition2 | Enables you to define expressions that flag rows for an insert, update, upsert, or delete operation. This property appears only when you select Data Driven as the operation type. You need to specify the data driven condition for non-CDC sources. For CDC sources, you need to leave the field empty as the rows in the CDC source tables are already marked with the operation types. |
1 Applies only to mappings in advanced mode. 2Doesn't apply to mappings in advanced mode. |
Property | Description |
---|---|
Update Mode | Defines how rows are updated in the target tables. Select from the following options:
|
Pre Query | Statement that you want to run before writing data to the target. You can use only insert, update, and delete operations. For example, if you want to insert records in the database before you read the records from the table, specify the following preSQL statement: { insert: 'yourCollection', documents: [ { name: 'Alice', age: 25 } ] } |
Post Query | Statement that you want to run after writing data to the target. You can use only insert, update, and delete operations. For example, if you want to update records in a table after you read the records from a table, specify the following postSQL statement: { update: 'yourCollection', updates: [ { q: { name: 'Alice' }, u: { $set: { age: 26 } } } ] } |
Additional Properties | Additional options that you want to specify to write data to MongoDB. Separate multiple options with an ampersand. For information about the additional properties that you can configure, see the Configure additional properties chapter. |
Forward Rejected Rows | Determines whether the transformation passes rejected rows to the next transformation or drops rejected rows. By default, the agent forwards rejected rows to the next transformation. |