Skip to content

Commit 00591ac

Browse files
authored
(DOCSP-32016) Adds procedure to insert documents with Atlas (#4900)
* (DOCSP-32016) Adds procedure to insert documents with Atlas * Includes change from cyopy review
1 parent 8a70b3f commit 00591ac

File tree

1 file changed

+49
-7
lines changed

1 file changed

+49
-7
lines changed

source/tutorial/insert-documents.txt

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,66 @@ Insert Documents
2222
:backlinks: none
2323
:depth: 1
2424

25-
----------
25+
.. include:: /includes/language-selector-instructions.rst
2626

27-
.. |arrow| unicode:: U+27A4
27+
.. tabs-selector:: drivers
2828

29-
|arrow| Use the **Select your language** drop-down menu in the
30-
upper-right to set the language of the examples on this page.
29+
This page provides examples of insert operations in MongoDB.
3130

32-
----------
31+
You can insert documents in MongoDB by using the following
32+
methods:
3333

34-
.. tabs-selector:: drivers
34+
.. |atlas-ref| replace:: :ref:`insert-documents-atlas`
3535

36-
This page provides examples of insert operations in MongoDB.
36+
.. include:: /includes/fact-methods.rst
3737

3838
.. note:: Creating a Collection
3939

4040
If the collection does not currently exist, insert operations will
4141
create the collection.
4242

43+
.. _insert-documents-atlas:
44+
45+
Insert Documents in the {+atlas+} UI
46+
-------------------------------------------
47+
48+
To insert a document in the {+atlas+} UI, complete the following steps.
49+
To learn more about working with documents in the {+atlas+} UI, see
50+
:atlas:`Create, View, Update, and Delete Documents
51+
</atlas-ui/documents>`.
52+
53+
.. procedure::
54+
:style: normal
55+
56+
.. step:: Navigate to the collection
57+
58+
a. In the {+atlas+} UI, click :guilabel:`Database` in the sidebar.
59+
#. For the database deployment to which you want to add documents,
60+
click :guilabel:`Browse Collections`.
61+
#. In the left navigation pane, select the database.
62+
#. In the left navigation pane, select the collection.
63+
64+
.. step:: Add the documents
65+
66+
a. Click :guilabel:`Insert Document`.
67+
#. Click the :guilabel:`{}` icon, which opens the JSON view.
68+
#. Paste the document array into the text entry field. For
69+
example, the following entry creates four documents, each of
70+
which contain three fields:
71+
72+
.. code-block::
73+
74+
[
75+
{ "prodId": 100, "price": 20, "quantity": 125 },
76+
{ "prodId": 101, "price": 10, "quantity": 234 },
77+
{ "prodId": 102, "price": 15, "quantity": 432 },
78+
{ "prodId": 103, "price": 17, "quantity": 320 }
79+
]
80+
81+
.. step:: Click Insert.
82+
83+
{+atlas+} adds the documents to the collection.
84+
4385
.. _write-op-insertOne:
4486

4587
Insert a Single Document

0 commit comments

Comments
 (0)