MongoDB adapter as a target

The MongoDB adapter as a target:
  • can be used in target context in a map by adding an output card to the map and configuring it to use MongoDB connection type.
  • can be used in target context in a flow by adding a target node to the flow and configuring it to use MongoDB connection type.
  • can be configured to insert, update, or delete documents in the specified collection.
  • when inserting documents, it can be configured to insert a single document in which case it is expecting to receive a single JSON object as input.
  • when inserting documents, it can be configured to insert multiple documents in which case it is expecting to receive a JSON array of multiple JSON objects as input.
  • When updating documents, the Query property specifies the filter to use to select the subset of documents in the collection on which to perform the update operation. The update document that defines the update operation to be performed is provided as the input data.
  • When deleting documents, the Query property specifies the filter to use to select the subset of documents to delete from the collection.
  • Update and delete operations can be configured using the GET map rule.
  • For the update operation, the -QUERY command in the adapter command line which is specified as the second argument of the GET rule defines the subset of documents on which to perform the update operation and the third argument of the GET rule is the update document that defines the update operation to perform. The output data from the GET rule is the result of the query after the update operation has completed.
  • In the delete operation, the -QUERY command within the adapter command line serves as the second argument of the GET rule, determining the subset of documents to be deleted from the collection. The third argument of the GET rule, while ignored in functionality, must be provided to ensure the interpretation of the GET rule as a request operation rather than a read operation. A placeholder value like "N/A" can be supplied for this argument. In this scenario, the GET rule does not produce any data in the output.