Skip to content

Commit 655d6b1

Browse files
authored
(DOCSP-32018) Adds procedure to query an array of documents in Atlas (#4824)
* (DOCSP-32018) Adds procedure to query an array of documents in Atlas * Includes copy revie w change
1 parent f23eec3 commit 655d6b1

File tree

2 files changed

+45
-5
lines changed

2 files changed

+45
-5
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
a. In the {+atlas+} UI, click :guilabel:`Database` in the sidebar.
2+
#. For the database deployment that contains the sample data,
3+
click :guilabel:`Browse Collections`.
4+
#. In the left navigation pane, select the
5+
:guilabel:`sample_training` database.
6+
#. Select the :guilabel:`grades` collection.

source/tutorial/query-array-of-documents.txt

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ Query an Array of Embedded Documents
2222
:backlinks: none
2323
:depth: 1
2424

25-
----------
25+
You can query documents in MongoDB by using the following
26+
methods:
2627

27-
.. |arrow| unicode:: U+27A4
28+
.. |atlas-ref| replace:: :ref:`query-array-documents-atlas-ui`
2829

29-
|arrow| Use the **Select your language** drop-down menu in the
30-
upper-right to set the language of the following examples.
30+
.. include:: /includes/fact-methods.rst
3131

32-
----------
32+
.. include:: /includes/language-selector-instructions.rst
3333

3434
.. tabs-selector:: drivers
3535

@@ -140,6 +140,40 @@ to ``A``:
140140

141141
.. include:: /includes/driver-examples/driver-example-query-37.rst
142142

143+
.. _query-array-documents-atlas-ui:
144+
145+
Query an Array of Documents with {+atlas+}
146+
---------------------------------------------------
147+
148+
The example in this section uses the :atlas:`sample training dataset
149+
</sample-data/sample-training/>`. To learn how to load the sample
150+
dataset into your {+atlas+} deployment, see :atlas:`Load Sample Data
151+
</sample-data/#std-label-load-sample-data>`.
152+
153+
To query an array of documents in {+atlas+}, follow these steps:
154+
155+
.. procedure::
156+
:style: normal
157+
158+
.. step:: Navigate to the collection
159+
160+
.. include:: /includes/steps-nav-atlas-sample-grades.rst
161+
162+
.. step:: Specify the Filter field
163+
164+
.. include:: /includes/steps-specify-query-filter.rst
165+
166+
.. code-block:: javascript
167+
168+
{ scores: { type: "exam" } }
169+
170+
.. step:: Click :guilabel:`Apply`
171+
172+
This query filter returns all documents
173+
in the ``sample_training.grades`` collection where the ``scores``
174+
field contains an ``exam`` score type.
175+
176+
143177
Additional Query Tutorials
144178
--------------------------
145179

0 commit comments

Comments
 (0)