Use the Query tab to refine read requests. This tab operates in two different query modes:
- Query expression mode (default)
- Aggregation pipeline specification mode.
The Query is aggregation pipeline option toggles between these two modes. The Query expression uses MongoDB’s JSON-like query language with query operators to perform query operations. The Aggregation pipeline specification field uses MongoDB’s aggregation framework to transform and combine documents in a collection. An aggregation pipeline connects several pipeline expressions together, with the output of the previous expression becoming the input for the next.
Enter the following information in the Query fields:
Fields/Option | Definition |
---|---|
Query expression (JSON) | Enter a query expression in this field to limit the output. |
Aggregation pipeline specification (JSON) | Select the Query is aggregation pipeline option to display the Aggregation pipeline specification (JSON) field. Then enter a pipeline expression to perform aggregations or selections. The method name, including the collection name of the database you selected in the Input Options tab, appears after the label for this field. |
Query is aggregation pipeline | Select this option to use the aggregation pipeline framework. |
Allow disk use | Select this option to turn on the allowDiskUse property so that you can process aggregation pipeline data when it exceeds the standard 100MB RAM allocation. |
Execute for each row | Select this option to perform the query on each row of data. |
Fields expression (JSON) | Enter an argument to control the projection (fields to return) from a query. If empty, all fields are returned. This field is only available for query expressions. |