Output options tab

Pentaho Data Integration

Version
9.3.x
Audience
anonymous
Part Number
MK-95PDIA003-15
MongoDB Output Output options tab

The Output options tab provides additional controls for inserting data into a MongoDB collection. If the specified collection does not exist, it is created before a document is inserted.

Enter the following information in the transformation step fields:

Option Description
Database Specify the target database for the output. When a valid hostname and port has been set, you can click Get DBs to retrieve the names of existing databases within a selected database.
Collection Specify the target collection for the output. When a valid hostname and port has been set, you can click Get Collections to retrieve the names of existing collections within a selected database. If the specified collection does not exist, it will be created before data is inserted.
Batch insert size Specify the batch size for bulk insert operations. The default value is 100 rows.
Truncate collection Select to delete existing data in the target collection before inserting new data.
Update

Sets the update write method for the specified database and collection.

The Upsert and Modifier update options are not available unless the Update field is selected.

Upsert Select to change the write method from insert to upsert. The upsert method replaces a matched record with an entire new record based on all the incoming fields specified in the Mongo document fields tab. A new record is created if match conditions fail for an update.
Multi-update Select to update all matching documents for each update or upsert operation.
Modifier update

Select to enable modifiers ($ operators) to be used to modify individual fields within matching documents. All matching documents are updated when the Multi-update option is selected.

To update more than one matching document, select Modifier update and Upsert. Selecting Modifier update, Upsert, and Multi-update applies updates to all matching documents, instead of just the first.

Number of retries for write operations Specify the number of times that a write operation is attempted.
Delay, in seconds, between retry attempts Specify the number of seconds to wait before the next retry.
Write concern (w option)
Specify the minimum number of servers that must succeed for a write operation. The values are:
-1
Disables all acknowledgement of write operation errors
0 (Zero)
Disables basic acknowledgment of write operations, but returns information about socket excepts and networking errors
1
Acknowledges write operations on the primary node
>1
Wait for successful write operations to the specified number of slaves, including the primary.

Click Get custom write concerns to retrieve custom write concerns that you have stored in the repository.

w Timeout Specify time (in milliseconds) to wait for a response to write operations before terminating the operation. Leave blank to never terminate.
Journaled writes Select to set write operations to wait until the mongod (the primary daemon process for the MongoDB system) acknowledges the write operation and commits the data to the journal.
Read preference
Specify which node to read first
  • Primary
  • Primary preferred
  • Secondary
  • Secondary preferred
  • Nearest

The default is Primary.

The Read preference is available when Modifier update is selected.