1
- title : " Copy the following ``storageSetConfig`` command to your preferred text editor ."
2
- ref : data-lake-prep-setconfig
1
+ title : " Click :guilabel:`Confirm` in the third box ."
2
+ ref : data-lake-confirm-ui
3
3
level : 4
4
4
stepnum : 1
5
5
content : |
6
-
7
- .. code-block:: json
8
- :emphasize-lines: 6-7
9
-
10
- use admin;
11
- db.runCommand( { "storageSetConfig": {
12
- "stores": [{
13
- "name": "s3store", // Creates an S3 store
14
- "provider": "s3", // Specifies the provider
15
- "region":"<bucket-region>", // Update with the bucket region code
16
- "bucket": "<bucket-name>" // Update with your bucket name
17
- }],
18
- "databases": [{
19
- "name": "sample", // Creates a database named sample
20
- "collections": [{
21
- "name": "*", // Creates a collection for each directory //
22
- "dataSources": [{
23
- "storeName": "s3store", // Links to the S3 store above
24
- "path": "/json/{collectionName()}"
25
- }]
26
- }]
27
- }]
28
- }})
6
+ .. figure:: /images/data-lake-confirm-db-colls-ui.png
7
+ :figwidth: 715px
8
+ :alt: Screenshot of confirm databases and collections in the UI.
9
+
10
+ ---
11
+ title : " Review the default storage configuration generated by |service|."
12
+ ref : data-lake-prep-setconfig
13
+ level : 4
14
+ stepnum : 2
15
+ content : |
29
16
30
17
The storage configuration maps a set of data stores to a set of
31
18
databases and collections. A store is a set of objects in an S3
32
19
bucket under a specific prefix.
33
-
34
- .. example::
35
20
36
- In this example, the ``s3store`` contains all objects in the
37
- S3 bucket. We configured a ``sample`` database, and created
38
- a collection for the data in each ``/json/`` subdirectory.
39
- To learn more about how the ``path`` field maps data, see
40
- :doc:`/reference/config-files/data-lake-configuration`.
21
+ The following is an example of a storage configuration generated by
22
+ |service|:
23
+
24
+ .. code-block:: json
25
+ :copyable: false
26
+
27
+ {
28
+ "databases": [
29
+ {
30
+ "name": "<your-database-name>",
31
+ "collections": [
32
+ {
33
+ "name": "data",
34
+ "dataSources": [
35
+ {
36
+ "path": "data.json",
37
+ "storeName": "<your-store-name>"
38
+ }
39
+ ]
40
+ },
41
+ {
42
+ "name": "listingsAndReviews",
43
+ "dataSources": [
44
+ {
45
+ "path": "listingsAndReviews.json",
46
+ "storeName": "<your-store-name>"
47
+ }
48
+ ]
49
+ },
50
+ {
51
+ "name": "*",
52
+ "dataSources": [
53
+ {
54
+ "path": "{collectionName()}",
55
+ "storeName": "<your-store-name>"
56
+ }
57
+ ]
58
+ }
59
+ ],
60
+ "views": []
61
+ }
62
+ ],
63
+ "stores": [
64
+ {
65
+ "provider": "s3",
66
+ "bucket": "<your-s3-bucket>",
67
+ "delimiter": "/",
68
+ "includeTags": false,
69
+ "name": "<your-store-name>",
70
+ "region": "<aws-s3-region>"
71
+ }
72
+ ]
73
+ }
74
+
75
+ By default, the database name and store name are the same as the
76
+ |s3| bucket.
41
77
42
78
.. include:: /includes/fact-data-lake-dynamic-collections.rst
43
79
44
80
---
45
- title : " Change the two highlighted lines to match your configuration."
46
- ref : getting-started-whitelist-info-data-lake
81
+ title : " Change the database name and store name in the ``stores`` and
82
+ ``databases`` arrays."
83
+ ref : getting-started-modify-names
47
84
level : 4
48
- stepnum : 2
85
+ stepnum : 3
49
86
content : |
50
87
.. list-table::
51
88
:widths: 20 20 40 20
@@ -56,40 +93,91 @@ content: |
56
93
- Description
57
94
- Example
58
95
59
- * - ``stores.s3.region ``
96
+ * - ``databases.name ``
60
97
- string
61
- - The |aws| `region code <https://docs.aws.amazon.com/general/latest/gr/rande.html>`__ .
62
- - ``us-east-1 ``
98
+ - The name of your database .
99
+ - ``sampleDB ``
63
100
64
- * - ``stores.s3.bucket ``
101
+ * - ``databases.collections.dataSources.storeName ``
65
102
- string
66
- - The bucket name you chose in :doc:`Part 1: Prepare your S3 Bucket </tutorial/load-sample-data>` .
67
- - ``atlas-sample-data ``
103
+ - The name of your store .
104
+ - ``s3store ``
68
105
69
- ---
70
- ref : data-lake-execute-setconfig
71
- level : 4
72
- stepnum : 3
73
- title : " Execute the ``storageSetConfig`` command."
74
- content : |
75
- a. Copy the filled-out command from your text editor.
76
- #. Paste the command into the ``mongo`` shell.
77
- #. Execute the command.
106
+ * - ``stores.name``
107
+ - string
108
+ - The name of your store.
109
+ - ``s3store``
78
110
79
- Upon successful configuration, the ``mongo `` shell
80
- outputs the following :
111
+ The following example storage configuration shows updated ``databases ``
112
+ and ``stores`` arrays :
81
113
82
- .. code-block:: sh
114
+ .. code-block:: json
115
+ :emphasize-lines: 4,11,20,29,43
116
+
117
+ {
118
+ "databases": [
119
+ {
120
+ "name": "sampleDB",
121
+ "collections": [
122
+ {
123
+ "name": "data",
124
+ "dataSources": [
125
+ {
126
+ "path": "data.json",
127
+ "storeName": "s3store"
128
+ }
129
+ ]
130
+ },
131
+ {
132
+ "name": "listingsAndReviews",
133
+ "dataSources": [
134
+ {
135
+ "path": "listingsAndReviews.json",
136
+ "storeName": "s3store"
137
+ }
138
+ ]
139
+ },
140
+ {
141
+ "name": "*",
142
+ "dataSources": [
143
+ {
144
+ "path": "{collectionName()}",
145
+ "storeName": "s3store"
146
+ }
147
+ ]
148
+ }
149
+ ],
150
+ "views": []
151
+ }
152
+ ],
153
+ "stores": [
154
+ {
155
+ "provider": "s3",
156
+ "bucket": "<your-s3-bucket>",
157
+ "delimiter": "/",
158
+ "includeTags": false,
159
+ "name": "s3store",
160
+ "region": "<aws-s3-region>"
161
+ }
162
+ ]
163
+ }
83
164
84
- { "ok" : 1 }
165
+ ---
166
+ ref : data-lake-execute-setconfig
167
+ level : 4
168
+ stepnum : 4
169
+ title : " Click :guilabel:`Save` to save the changes to the storage
170
+ configuration."
85
171
86
172
---
87
173
ref : data-lake-check-databases
88
174
level : 4
89
- stepnum : 3
175
+ stepnum : 5
90
176
title : " Verify your database and collection mapping."
91
177
content : |
92
- a. Run the following command to display the mapped database:
178
+ a. Connect to your {+dl+} with the :binary:`~bin.mongo` shell.
179
+
180
+ b. Run the following command to display the mapped database:
93
181
94
182
.. code-block:: sh
95
183
@@ -101,17 +189,13 @@ content: |
101
189
.. code-block:: sh
102
190
:copyable: false
103
191
104
- sample (empty)
105
-
106
- .. note::
107
-
108
- The ``(empty)`` in the output is expected.
192
+ sampleDB
109
193
110
- #. Switch to the ``sample `` database:
194
+ #. Switch to the ``sampleDB `` database:
111
195
112
196
.. code-block:: sh
113
197
114
- use sample
198
+ use sampleDB
115
199
116
200
#. Run the following command to display the mapped collections:
117
201
@@ -122,9 +206,9 @@ content: |
122
206
Upon successful configuration, the ``mongo`` shell outputs
123
207
the following:
124
208
125
- .. code-block:: sh
209
+ .. code-block:: none
126
210
:copyable: false
127
211
128
- airbnb
129
- weather
212
+ data
213
+ listingsAndReviews
130
214
...
0 commit comments