export
Extract MongoDB collection data or query results in EJSON format. Specify filters, projections, sorting, and export format to customize data retrieval for analysis or migration.
Instructions
Export a collection data or query results in the specified EJSON format.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
collection | Yes | Collection name | |
database | Yes | Database name | |
exportTitle | Yes | A short description to uniquely identify the export. | |
filter | No | The query filter, matching the syntax of the query argument of db.collection.find() | |
jsonExportFormat | No | The format to be used when exporting collection data as EJSON with default being relaxed. relaxed: A string format that emphasizes readability and interoperability at the expense of type preservation. That is, conversion from relaxed format to BSON can lose type information. canonical: A string format that emphasizes type preservation at the expense of readability and interoperability. That is, conversion from canonical to BSON will generally preserve type information except in certain specific cases. | relaxed |
limit | No | The maximum number of documents to return | |
projection | No | The projection, matching the syntax of the projection argument of db.collection.find() | |
sort | No | A document, describing the sort order, matching the syntax of the sort argument of cursor.sort(). The keys of the object are the fields to sort on, while the values are the sort directions (1 for ascending, -1 for descending). |