MongoDB documents can be managed in Etlworks using file-style operations — copy, download, delete — the same mental model you use for files. The flows use a MongoDB Document connection, which represents individual documents (not collections).
Copy documents into MongoDB
Create a Copy Files flow with the destination set to a MongoDB Document connection.
Requirements:
- The source document is in JSON format.
- Etlworks serializes the JSON to BSON automatically (BSON is MongoDB's native storage format).
Typical use cases:
- Store JSON files as MongoDB documents.
- Persist API responses as documents.
- Load configuration or reference payloads into MongoDB.
Download documents from MongoDB
Create a Copy Files flow with the source set to a MongoDB Document connection. The flow downloads matching documents to a file destination.
Pick the source (FROM) using one of three forms:
| FROM form | What it does |
|---|---|
| Fully qualified document name | Downloads a single document with that identifier. |
| Wildcard document name (e.g. sales_orders*) | Downloads every matching document, combined into one JSON array (each document = one element). |
| MongoDB query in JSON (e.g. {"first":"Simba"}) | Downloads every document matching the query, combined into one JSON array. |
Delete documents in MongoDB
Create a Delete Files flow with the source set to a MongoDB Document connection. The flow deletes matching documents.
Same three forms for FROM:
| FROM form | What it does |
|---|---|
| Fully qualified document name | Deletes a single document. |
| Wildcard document name (e.g. sales_orders*) | Deletes every matching document. |
| MongoDB query in JSON (e.g. {"first":"John"}) | Deletes every document matching the query. |