Export Aggregation Pipeline Results
On this page
To use your aggregated data in other external tools, you can export your pipeline results from MongoDB Compass as a JSON or CSV file.
About this Task
Avoid using CSV files exports to back up your data. CSV files may lose type information and are not suitable for backing up your data.
Steps
(Optional) Choose an advanced JSON format option
If choose to export your data as a JSON file, you can expand the Advanced JSON Format drop-down menu and select from the following extended JSON formats:
JSON Format | Description | Sample Document | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Default Extended JSON | A string format that avoids any loss of BSON type information. This is the default Compass setting. |
| |||||||||||
Relaxed Extended JSON | 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. WARNING: This format is not recommended for data integrity. |
| |||||||||||
Canonical Extended JSON | 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. |
|