Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Compass
Created by Guest
Created on May 15, 2021

New Pipeline From Text tool should be more flexible

In Compass' "Aggregations" tab users can select the option "New Pipeline From Text" This accepts pasting in a pipeline like: [ .... ] However, it doesn't accept pasting in a pipeline with the original variable definition, like: var mypipeline = [ .... ]; This is an annoying paper-cut when people are pasting in a pipeline they've previously been editing/using somewhere else. For an example, see the 'var pipeline = [..];' copyable code snippet in the Practical MongoDB Aggregations book at: https://www.practical-mongodb-aggregations.com/examples/foundational/filtered-top-subset.html#aggregation-pipeline The tool should allow a variable definition to precede [...], where the variable can have any name and may be declared with 'var', 'let', 'const' or qualifiers. Also, the tool should not reject the pipeline if it is followed by a Javascript ';' terminator (regardless of whether the pipeline has been preceded with a variable definition or not).
  • Attach files