13
13
:class: singlecol
14
14
15
15
``$lookup`` performs a left outer join to an unsharded collection in the
16
- same database to filter in documents from the “ joined” collection for
16
+ same database to filter in documents from the " joined" collection for
17
17
processing. For more information, see
18
18
:manual:`$lookup </reference/operator/aggregation/lookup/>`. In
19
19
{+data-lake+}, ``$lookup`` can be used to perform a join of collections
@@ -108,7 +108,7 @@ Suppose there are three databases named ``sourceDB1``, ``sourceDB2``, and
108
108
109
109
.. code-block:: json
110
110
111
- db.orders.insert ([
111
+ db.orders.insertMany ([
112
112
{ "_id" : 1, "item" : "almonds", "price" : 12, "quantity" : 2 },
113
113
{ "_id" : 2, "item" : "pecans", "price" : 20, "quantity" : 1 },
114
114
{ "_id" : 3 }
@@ -119,7 +119,7 @@ Suppose there are three databases named ``sourceDB1``, ``sourceDB2``, and
119
119
120
120
.. code-block:: json
121
121
122
- db.catalog.insert ([
122
+ db.catalog.insertMany ([
123
123
{ "_id" : 1, "sku" : "almonds", "description": "product 1" },
124
124
{ "_id" : 2, "sku" : "bread", "description": "product 2" },
125
125
{ "_id" : 3, "sku" : "cashews", "description": "product 3" },
@@ -133,7 +133,7 @@ Suppose there are three databases named ``sourceDB1``, ``sourceDB2``, and
133
133
134
134
.. code-block:: json
135
135
136
- db.warehouses.insert ([
136
+ db.warehouses.insertMany ([
137
137
{ "_id" : 1, "stock_item" : "almonds", "warehouse": "A", "instock" : 120 },
138
138
{ "_id" : 2, "stock_item" : "pecans", "warehouse": "A", "instock" : 70 },
139
139
{ "_id" : 3, "stock_item" : "cashews", "warehouse": "B", "instock" : 60 },
0 commit comments