Export Pipeline to Specific Language¶
New in version 1.15.0
You can use the Aggregation Pipeline Builder to export your finished pipeline to one of the supported languages; Java, Node, C#, and Python 3. This feature facilitates formatting and exporting pipelines created in MongoDB Compass for use in your applications.
Open the Aggregation Pipeline Builder for the desired collection.¶
Navigate to the collection for which you wish to export your aggregation pipeline. Click the Aggregations tab.
Click the Export button.¶
Optional: Include import statements, if desired.¶
Check the Include Import Statements option to include the required import statements for the selected programming language.
Click at the top-right of the pipeline to copy the pipeline for the selected programming language to your clipboard. You can now integrate and execute your created pipeline into your application.