What is MongoDB Compass?MongoDBCompass是什么?

MongoDB Compass is a powerful GUI for querying, aggregating, and analyzing your MongoDB data in a visual environment.MongoDB Compass是一个强大的GUI,用于在可视化环境中查询、聚合和分析MongoDB数据。

Compass is free to use and source available, and can be run on macOS, Windows, and Linux.Compass是免费使用和可用的源代码,可以在macOS、Windows和Linux上运行。

下载Compass View installation instructions查看安装说明

Homepage hero image
What You Can Do你能做什么

Visually Explore Your Data直观地探索数据

Explore some of the tasks Compass can help you accomplish, such as importing and managing data from an easy-to-navigate interface.探索Compass可以帮助您完成的一些任务,例如从易于导航的界面导入和管理数据。

Import your data导入数据
1

Connect to your deployment连接到部署

Connect to a MongoDB deployment hosted on MongoDB Atlas, or a deployment hosted locally on your own machine.连接到MongoDB Atlas上托管的MongoDB部署,或本地托管在您自己机器上的部署。

To learn more, see Connect to MongoDB要了解更多信息,请参阅连接到MongoDB

2

Import your data导入数据

Import data from CSV or JSON files into your MongoDB database.将CSV或JSON文件中的数据导入MongoDB数据库。

To learn more, see Import and Export Data要了解更多信息,请参阅导入和导出数据

MongoDB Compass import image
Query your data查询数据
1

Insert documents into your collections将文档插入到集合中

Paste documents into the JSON view, or manually insert documents using a field-by-field editor.将文档粘贴到JSON视图中,或使用逐字段编辑器手动插入文档。

To learn more, see Insert Documents要了解更多信息,请参阅插入文档

2

Query your data查询数据

Write ad-hoc queries or generate queries with the help of AI to filter your data. Explore trends and commonalities in your collections.编写即席查询或在人工智能的帮助下生成查询来筛选数据。探索您集合中的趋势和共性。

To learn more, see:要了解更多信息,请参阅:

MongoDB Compass collection query image
Create aggregation pipelines创建聚合管道
1

Insert documents into your collections将文档插入到集合中

Insert documents into your collections in two ways, JSON Mode and a Field-by-Field Editor.通过两种方式将文档插入到集合中,JSON模式和逐字段编辑器。

To learn more, see Insert Documents要了解更多信息,请参阅插入文档

2

Create aggregation pipelines创建聚合管道

Write aggregation pipelines that allow documents in a collection or view to pass through multiple stages where they are processed into a set of aggregated results.编写聚合管道,允许集合或视图中的文档通过多个阶段,在那里它们被处理成一组聚合结果。

To learn more, see Aggregation Pipeline Builder要了解更多信息,请参阅聚合管道生成器

MongoDB Compass aggregation pipeline image
Run commands in the shell在shell中运行命令
1

Connect to your deployment连接到部署

Connect to a MongoDB deployment hosted on MongoDB Atlas, or a deployment hosted locally on your own machine.连接到MongoDB Atlas上托管的MongoDB部署,或本地托管在您自己机器上的部署。

To learn more, see Connect to MongoDB要了解更多信息,请参阅连接到MongoDB

2

Work with your data in the MongoDB Shell在MongoDB Shell中处理数据

Use the embedded MongoDB Shell in Compass to control your data in an interactive JavaScript environment.使用Compass中的嵌入式MongoDB Shell在交互式JavaScript环境中控制数据。

To learn more, see Embedded MongoDB Shell要了解更多信息,请参阅嵌入式MongoDB Shell

MongoDB Compass embedded shell image
Related Products and Resources相关产品和资源

Go Further with Compass使用Compass走得更远

Expand your knowledge of MongoDB by using Compass with other MongoDB products.通过将Compass与其他MongoDB产品结合使用,扩展您对MongoDB的了解。

MongoDB Atlas icon

Use Compass to connect to your Atlas cluster使用Compass连接到Atlas集群

Read Atlas docs阅读Atlas文档

MongoDB University icon

Learn MongoDB Basics with MongoDB University在MongoDB大学学习MongoDB基础知识

Learn MongoDB Basics学习MongoDB基础知识

MongoDB Server icon

Access more in-depth examples of querying data访问更深入的查询数据示例

Read Server docs读取服务器文档