This week we have released the Aggregation Pipeline Builder in MongoDB Atlas. This tool allows developers to quickly learn, test, and visualize the power of MongoDB’s aggregation framework through a simple user interface.
Performing Aggregations with MongoDB
MongoDB’s aggregation framework is a powerful tool that allows you to query your database through multi-stage pipelines. These pipelines process data by passing documents through a series of stages that filter, group, sort, transform, or perform operations on the data. You can then use the aggregated results for analysis, visualization, reporting, and more.
The Aggregation Pipeline Builder enables developers to explore and refine aggregation queries before executing them in application code, saving hours of trial and error. With features like drag-and-drop stages, code skeletons, and preview mode, more developers can take advantage of the rich query capabilities of MongoDB. Together with other tools like the Data Explorer, Triggers, and Charts, the Aggregation Pipeline Builder makes MongoDB Atlas a valuable tool for improving developer productivity.
Learn the Aggregation Framework
If you’re new to MongoDB or the aggregation framework, MongoDB Atlas is the best way to learn first-hand for free. Simply sign up for an account, deploy a free tier cluster in a cloud region near you, and load our free sample dataset. For more information on how to get started with MongoDB Atlas, visit our Getting Started Guide.
In Atlas, the Aggregation Pipeline Builder can be found under the Collections view of your cluster, next to the Find and Indexes tabs. (If you’re familiar with the Aggregation Pipeline Builder in MongoDB Compass, you’ll find a similar interface here.)
There are several features of the UI that make it easy to learn about aggregations. A drop-down menu gives you a list of available pipeline stages to get started. After selecting a stage, you can select the info icon to find more information in our Docs. Finally, code skeletons and auto-completion for operators and document field names allow you to start building stages without having to learn the syntax.
Test and Preview Aggregation Pipelines
The aggregation framework offers over 25 types of aggregation stages and over 100 operators for those stages to work with. That allows you to sort, filter, transform, and manipulate your data. The Pipeline Builder's visual interface makes it easier to find and discover these capabilities and learn how to apply them in practice. With the Aggregation Pipeline Builder, you can now quickly test and debug long and complex aggregation queries directly in your browser.
Auto-preview uses sample mode to ensure you can see the output of each stage of your pipeline without taxing your cluster with data intensive queries as assemble your pipeline. Once you have finalized your aggregation pipeline, you can name it and export it in your preferred language to execute in your application code.
To learn more about Aggregation Pipeline Builder in Atlas, visit our documentation.