MongoDB.local SF, Jan 15: See the speaker lineup & ship your AI vision faster. Use WEB50 to save 50%
Find out more >
Docs Menu
Docs Home
/
Interact with Data
/

Manage Saved Queries and Aggregations in Atlas

You can load saved queries and aggregations from the My Queries view once you are connected to your cluster. This page explains how to add and view favorite queries and aggregations.

You can save a pipeline for future use. If you load a saved pipeline, you can change it without changing the original saved copy. You can also create a view from your pipeline results.

To save your pipeline:

1

In the Aggregations pane, open the Save drop-down menu and click Save as.

Save pipeline as
2
3

Click the Save button to save your pipeline. Your pipeline will be saved under the folder icon in the top-left corner of the pipeline builder.

You can favorite a query for future use. If you load a favorite query, you can change it without changing the original saved copy.

To add a query to your favorites:

1

Click the clock icon on the query bar in the Documents pane.

2

Hover over your query and click the star Star button.

3

Enter a name for your query.

4

You can view your saved queries and aggregation pipelines on the My Queries tab once connected to your cluster.

When you click a saved or favorite query tile, Atlas opens the Documents tab with the filter loaded.

When you click a saved or favorite pipeline tile, Atlas opens the Aggregations tab with the pipeline loaded.

You can also view favorite queries from the Favorites tab from in the Documents view. To open the Favorites tab:

1

Click the clock icon at the top of the Documents tab.

2

Select your favorited operation.

  • If your favorited operation is a query, the Favorites list view only displays a Filter statement, copy icon, and delete icon.

    Note

    Clicking a favorited query in the Favorites list view populates your Query Bar with that query.

  • If your favorited operation is a bulk update statement, the Favorites list view only displays a Filter statement, Update statement, copy icon, delete icon, and open new tab icon.

    Note

    If you click the open new tab icon, the Update Documents modal opens with the bulk update statement and the filter criteria. For details on bulk update statements in Atlas, see Modify Multiple Documents.

For details on how to view query history see viewing recent query history.

On this page