$out

On this page
$out takes documents returned by the aggregation pipeline and writes them to a specified collection. The $out operator must be the last stage in the aggregation pipeline. In Atlas Data Lake, you can use $out to write data from any one of the supported data stores or multiple supported data stores when using federated queries to any one of the following:
- S3 buckets with read and write permissions
- Atlas cluster namespace
You must connect to your Data Lake to use $out.
Permissions Required
Syntax
Fields
Options
Option | Type | Description | Necessity | |
---|---|---|---|---|
background | boolean | Flag to run aggregation operations in the background. If
omitted, defaults to
Use this option if you want to submit other new queries without waiting for currently running queries to complete or disconnect your Data Lake connection while the queries continue to run in the background. | Optional |
Examples
Run Query in the background
The following example shows $out syntax for running an aggregation pipeline that ends with the $out stage in the background.