Skip to content

Commit 810aeff

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

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
@@ -18,14 +18,14 @@ Query an Array of Embedded Documents
1818
:backlinks: none
1919
:depth: 1
2020

21-
----------
21+
You can query documents in MongoDB by using the following
22+
methods:
2223

23-
.. |arrow| unicode:: U+27A4
24+
.. |atlas-ref| replace:: :ref:`query-array-documents-atlas-ui`
2425

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

28-
----------
28+
.. include:: /includes/language-selector-instructions.rst
2929

3030
.. tabs-selector:: drivers
3131

@@ -136,6 +136,40 @@ to ``A``:
136136

137137
.. include:: /includes/driver-examples/driver-example-query-37.rst
138138

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

0 commit comments

Comments
 (0)