Skip to content

Commit 22bbfe6

Browse files
authored
DOCSP-27089-Import-Pipeline-Updates (#447)
* DOCSP-27089 Inital rewrite * * * update instructions * to * bullet indent * Feedback update 1 * small edit * Internalreview feedback 2 * link update
1 parent bf57a6f commit 22bbfe6

File tree

1 file changed

+41
-12
lines changed

1 file changed

+41
-12
lines changed

source/import-pipeline-from-text.txt

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,59 @@ Import Pipeline from Text
1212
:depth: 1
1313
:class: singlecol
1414

15-
*New in version 1.15.0*
16-
1715
You can import aggregation pipelines from plain text into
1816
the :ref:`Aggregation Pipeline Builder <compass-agg-builder>` to
1917
easily modify and execute your pipelines. Importing a plain text
2018
aggregation pipeline shows how each stage of the pipeline
2119
affects the output, and illustrates the effects of modifying specific
2220
pipeline stages using the Pipeline Builder's :guilabel:`Output` panes.
2321

22+
.. note:: Importing Pipelines From Text
23+
24+
Starting in Compass 1.35, the import pipeline button has been removed
25+
from the Compass GUI. The full functionality of importing pipelines
26+
from text is still supported as part of the View Pipeline as
27+
Text edit mode.
28+
29+
2430
Syntax
2531
------
2632

27-
The imported pipeline must be in the
28-
:manual:`MongoDB query language </tutorial/query-documents/>`
29-
(i.e. the same syntax used as the ``pipeline`` parameter of the
30-
:manual:`db.collection.aggregate()
31-
</reference/method/db.collection.aggregate/>` method). The imported
32-
pipeline must be an array, even if there is only one stage in the
33-
pipeline.
33+
The imported pipeline must be:
34+
35+
- In the :manual:`MongoDB query language </tutorial/query-documents/>`,
36+
this is the same syntax used in the ``pipeline`` parameter of the
37+
:method:`aggregate() <db.collection.aggregate()>` method.
38+
- An array, even if there is only one stage in the pipeline.
3439

3540
Procedure
3641
---------
3742

38-
.. include:: /includes/steps/import-pipeline-from-text.rst
43+
.. procedure::
44+
:style: normal
45+
46+
.. step:: In the aggregation pipeline pane, click the
47+
:guilabel:`</> Text` toggle switch to enable text mode for
48+
pipeline editing.
49+
50+
.. figure:: /images/compass/agg-builder-textview-toggle-on.png
51+
:alt: Toggle Textview Mode on
52+
53+
.. step:: Type or paste an aggregation pipeline into the
54+
text editor. The text editor provides real-time linting
55+
for correct syntax and debugging information.
56+
57+
For example, the following pipeline consists of a single
58+
:pipeline:`$limit` stage:
59+
60+
.. code-block:: javascript
61+
62+
[ { "$limit" : 4 } ]
63+
64+
.. figure:: /images/compass/agg-builder-textview-edit.png
65+
:alt: Edit aggregation pipeline
3966

40-
Once you import your pipeline, you can add and modify individual stages
41-
and see the results reflected in the :guilabel:`Output` of each respective stage.
67+
After you import your pipeline, you can click the :guilabel:`{} Stages`
68+
switch to return to stage view mode. In this mode you can modify
69+
individual stages to see the results reflected in the
70+
:guilabel:`Output` of each respective stage.

0 commit comments

Comments
 (0)