Aggregation pipelines

Follow the transformation.
Stage by stage.

A pipeline is easier to understand when you can see its intermediate results. Add stages, check their output, and switch to raw pipeline text whenever that suits the work.

Stage previewsRaw pipeline modeWrite confirmation
Take a closer look
Bison’s aggregation builder with four stages, previews, and category revenue results.
The real aggregation builder in light appearance. All sales figures are sample data.
01

Inspect the in-between.

Preview the output at a stage to understand where a filter, grouping, or transformation changes the result.

02

Work in stages or text.

Use the stage list to shape a pipeline, or edit the whole array in raw mode. Switch between the two as the query grows.

03

Know when a pipeline writes.

$out and $merge require confirmation. Bison makes the destination visible before a pipeline changes stored data.

From first click to useful work

A place for
your next step.

  1. 01

    Start with the collection

    Open Aggregation from the collection’s sidebar and add the first stage.

  2. 02

    Check each transformation

    Use previews to validate filters and grouped values before adding the next stage.

  3. 03

    Run the complete pipeline

    Inspect the results in a table, tree, or JSON view, and use Explain to understand the plan.

A few practical details

Good to know.
Before you begin.

Can I paste an existing pipeline?

Yes. Raw mode accepts the pipeline array, and you can switch to the stage list to work through it.

Do previews silently run write stages?

No. Write-producing stages are guarded. Running $out or $merge requires an explicit confirmation.