Docs Home → View & Analyze Data → MongoDB Compass
Create an Aggregation Pipeline
On this page
The Aggregation Pipeline Builder in MongoDB Compass helps you create aggregation pipelines to process documents from a collection or view and return computed results.
About this Task
MongoDB Compass provides different modes to create aggregation pipelines:
Stage View Mode, a visual pipeline editor that preloads pipeline syntax based on your selected stages.
Stage Wizard, a feature of Stage View Mode that provides a set of templates for simple aggregation stage use cases. The Stage Wizard only includes simple use cases to help you get started with your aggregation pipeline.
Focus Mode, a feature of Stage View Mode where you edit one pipeline stage at a time. Focus Mode helps you manage complex or deeply nested aggregation pipeline stages.
Text View Mode, a text-based pipeline editor that accepts raw pipeline syntax.
Before You Begin
To build an aggregation pipeline, choose a collection and click the Aggregations tab. Compass displays a blank aggregation pipeline. The Preview of Documents in the Collection section shows 10 documents randomly sampled from the chosen collection.
Note
Atlas Search Stages
When you connect Compass to a MongoDB deployment hosted on Atlas, additional Atlas-only stages $search and $searchMeta are available in the Aggregation Pipeline Builder. Use these stages to perform full-text search on Atlas collections.
Steps
To see how to create an aggregation pipeline, select the tab corresponding to your chosen view mode: