Knowledge base

Using components: MongoDB Destination

Use the MongoDB destination component to store the output of a data flow in a MongoDB collection.


Select an existing MongoDB connection or create a new one (for more information, see Allowing Xplenty access to MongoDB.)

Destination Properties 

  • Target collection - The name of the target table in your database. If the table doesn't exist, it will be created automatically.
  • Operation type - The method of data insertion.
    • Insert only (Append) - Default behavior. Data will only be appended to the target table.
    • Merge with existing data using update and insert - Incoming data is merged with existing data in the table by updating existing data and inserting new data. Requires setting the merge keys correctly in field mapping. In case of multiple document match in destination, it will only update a single document.

Schema Mapping 

Map the dataflow fields to the target table's columns. If merge operation is used, you must select at least a field or multiple fields as keys, which will be used to uniquely identify rows in the table for the merge operation.

The following table shows how data types in Xplenty map to MongoDB data types:

Xplenty MongoDB
String String
Integer 32 Bit Integer
Long 64 Bit Integer
Double Double
Boolean Boolean