...
{
"name" : "MongoDB Hydrator",
"active" : true,
"type" : "mongo-hydrator",
"servers": [
{
"host": "localhost",
"port": 8080
}
],
"url": "mongo+srv://cluster0.qwerty.mongodb.net/myDatabase.myCollection",
"tls": false,
"db": "database_name",
"collection": "collection_name",
"transactions": false,
"strict": false,
"multiDocumentPath": "/arrayField",
"multiDocumentKeepSiblings": false,
"multiDocumentCleanup": true
}
Configuration parameters:
...
(Optional, Boolean) Whether to strictly enforce inserts and updates (and fail in the case an inserted id already exists, or an updated id doesn't already exist) or to use upserts (where an insert of an existing id or an update to a non-existent id will succeed). Defaults to false
multiDocumentPath
(Optional, String) Path to an array field in the record that will be used to generate multiple documents, each value in the array will be written to MongoDB as a new document. If the field isn't found, or it's not an array the record will be ignored.
multiDocumentKeepSiblings
(Optional, Boolean) Whether to keep the same document structure. If it's set to false
the document will just keep the field being used for the multi document hydration. Defaults to false
multiDocumentCleanup
(Optional, Boolean) Whether to perform a cleanup for documents that were not hydrated in the current execution, applies only to multi-document hydration. Defaults to true