Overview
In Etlworks it is possible to work with documents stored in MongoDB using techniques similar to the ones used when working with files.
Copy Documents into MongoDB
To copy existing documents such as files into MongoDB, use Copy Files Flow type, where the destination is a MongoDB document
Connection.
The source document must be in the JSON Format, which can be serialized to BSON, which is used by MongoDB.
Download Documents from MongoDB
To download documents from MongoDB as files, use the Copy Files Flow type, where the source is a MongoDB document
Connection.
When specifying the source (FROM
), the following options are available:
- A fully qualified document name: the document id as it is stored in MongoDB.
- A wildcard document name (for example,
sales_orders*
): the system will read all the documents that match the wildcard and combine them into a JSON array, where each document is one row in the array. - A request to MongoDB in the JSON Format: the system will read all the documents that match the request and combine them into a JSON array, where each document is one row in the array. Here's an example of a request:
{"first":"Simba"}
.
Delete Documents in MongoDB
To delete documents in MongoDB, use the Delete Files Flow type, where the source is a MongoDB document
Connection.
When specifying the source (FROM
), the following options are available:
- A fully qualified document name: a document id as it is stored in MongoDB.
- A wildcard document name (for example,
sales_orders*
): the system will delete all the documents that match the wildcard. - A request to MongoDB in the JSON Format: the system will delete all the documents that match the request. Here's an example of a request:
{"first":"John"}
.
Comments
0 comments
Please sign in to leave a comment.