To use your aggregated data in other external tools, you can export your pipeline results from MongoDB Compass as a JSON or CSV file.要在其他外部工具中使用聚合数据,您可以将MongoDB Compass的管道结果导出为JSON或CSV文件。
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.避免使用CSV文件导出来备份数据。CSV文件可能会丢失类型信息,不适合备份数据。
Steps步骤
Click Export单击“导出”
In the top right of the aggregation pipeline builder, click the Export button to open the modal.在聚合管道生成器的右上角,单击导出按钮打开模式。

Choose the file type for your export选择导出的文件类型
Under Export File Type, select either JSON or CSV. If you select JSON, your data is exported to the target file as an array of JSON objects.在“导出文件类型”下,选择JSON或CSV。如果选择JSON,则数据将作为JSON对象数组导出到目标文件。
(Optional) Choose an advanced JSON format option(可选)选择高级JSON格式选项
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文件,您可以展开“高级JSON格式”下拉菜单,并从以下扩展JSON格式中进行选择:
| ||
| | |
|