Skip to content

Commit

Permalink
DOCSP-43493 adding agg pipeline example
Browse files Browse the repository at this point in the history
  • Loading branch information
ltran-mdb2 committed Sep 19, 2024
1 parent 1ebb8ce commit 270dc4e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions source/copilot-query.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Each document in the collection has the following structure:
Once you connect to the deployment that contains the ``users``
collection, you can ask the Github Copilot chat to generate a query that
finds the document in the ``users`` collection that has the ``name``
value of `` "Kayden Washington"``.
value of ``Kayden Washington``.

.. code-block:: javascript
:copyable: false
Expand Down Expand Up @@ -89,7 +89,9 @@ collection, you can ask the Github Copilot chat to generate an aggregation pipel
.. code-block:: javascript
:copyable: false

@MongoDB /query Generate an aggregation pipeline on the users collection that first sorts documents alphabetically by name and then removes the password field from each document.
@MongoDB /query Generate an aggregation pipeline on the users
collection that first sorts documents alphabetically by name and then
removes the password field from each document.

The |copilot| generates the following aggregation pipeline:

Expand All @@ -107,7 +109,9 @@ You can also iteratively build on your aggregation pipeline.
.. code-block:: javascript
:copyable: false

@MongoDB /query Add a stage to my pipeline that adds a username field ot each document containing the user's email username without the email domain.
@MongoDB /query Add a stage to my pipeline that adds a username field
of each document containing the user's email username without the
email domain.

The |copilot| returns the following aggregation pipeline:

Expand Down

0 comments on commit 270dc4e

Please sign in to comment.