Skip to content

Commit fe62901

Browse files
DOCSP-27982 Import and Export Compass updates (#494)
* DOCSP-27982 import export updates * DOCSP-27982 sizing updates * DOCSP-27982 updates * DOCSP-27982 update screenshots * DOCSP-27982 update screenshots * DOCSP-27982 internal feedback
1 parent 791f483 commit fe62901

9 files changed

+118
-113
lines changed
-64.3 KB
Loading
46.2 KB
Loading
Loading
163 KB
Loading
66.2 KB
Loading

source/import-export.txt

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,13 @@ To import your formatted data into a collection:
117117

118118
A progress bar displays the status of the import. If an error occurs
119119
during import, the progress bar turns red and an error message
120-
appears in the dialog. After successful import, the dialog closes and
120+
appears in the dialog. To see all errors, click :guilabel:`View Log`.
121+
122+
After successful import, the dialog closes and
121123
Compass displays the collection page containing the newly imported
122124
documents.
123125

126+
124127
Export Data from a Collection
125128
-----------------------------
126129

@@ -134,11 +137,13 @@ pipeline results.
134137
Behavior
135138
~~~~~~~~
136139

137-
While it is possible to exclude documents by using a query filter,
138-
it is not possible to re-shape exported documents with a
139-
:ref:`project <query-bar-project>` document. Even when you specify a
140-
``project`` option in the query, |compass-short| still exports the
141-
entire document.
140+
- Avoid exporting to :guilabel:`CSV` files when possible. :guilabel:`CSV` files
141+
may lose type information and are not suitable for backing up your data.
142+
143+
- You can use a query filter to export only the documents that match the filter.
144+
145+
- You can use the :ref:`Project <query-bar-project>` field in the query bar to
146+
specify the fields to return or export.
142147

143148
Procedure
144149
~~~~~~~~~
@@ -189,17 +194,38 @@ Procedure
189194

190195
.. step:: Click :guilabel:`Export`.
191196

192-
.. step:: Choose the appropriate file type.
197+
.. step:: Select the appropriate file type.
198+
199+
Under :guilabel:`Export File Type`, select either :guilabel:`JSON`
200+
or :guilabel:`CSV`. If you select :guilabel:`JSON`, you can expand
201+
the :guilabel:`Advanced JSON Format` dropdown and select from the
202+
following extended JSON formats:
203+
204+
.. list-table::
205+
:header-rows: 1
206+
:widths: 50, 50
207+
208+
* - JSON Format
209+
- Description
210+
211+
* - Default Extended JSON
212+
- A string format that avoids any loss of BSON type information. This
213+
is the default |compass-short| setting.
193214

194-
Under :guilabel:`Select Export File Type`, select either
195-
:guilabel:`JSON` or :guilabel:`CSV`. If you select :guilabel:`JSON`,
196-
your data is exported to the target file as an array of JSON objects.
215+
* - Relaxed Extended JSON
216+
- A string format that emphasizes readability and interoperability at
217+
the expense of type preservation. That is, conversion from relaxed
218+
format to BSON can lose type information.
197219

198-
Then, under :guilabel:`Output`, choose where to export the file to.
220+
.. warning::
221+
222+
This format is not recommended for data integrity.
199223

200-
.. figure:: /images/compass/aggregation-export.png
201-
:alt: Export Aggregation Data
202-
:width: 70%
224+
* - Canonical Extended JSON
225+
- A string format that emphasizes type preservation at the expense of
226+
readability and interoperability. That is, conversion from canonical
227+
to BSON will generally preserve type information except in certain
228+
specific cases.
203229

204230
.. step:: Click :guilabel:`Export`.
205231

source/includes/steps-export-filter.yaml

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,46 +14,38 @@ content: |
1414
:doc:`Collections </collections>` tab or click the collection in the
1515
left-hand pane.
1616
---
17-
title: "Specify a filter in the Query Bar"
17+
title: Specify a filter in the :guilabel:`query bar`.
1818
level: 4
1919
ref: export-specify-filter
2020
content: |
2121
Specify a :ref:`filter <query-bar-filter>` in the
2222
:ref:`query bar <compass-query-bar>` to export only the documents
2323
which match the filter.
24-
2524
---
26-
title: Click :guilabel:`Collection` in the top-level menu and select
27-
:guilabel:`Export Collection`
25+
title: Click the :guilabel:`Export Data` dropdown and select :guilabel:`Export query results`.
2826
level: 4
2927
ref: export-collection
3028
content: |
31-
.. figure:: /images/compass/export-data-filter-option-select.png
32-
:alt: Export data select menu
33-
34-
|compass-short| displays the following dialog:
35-
36-
.. figure:: /images/compass/export-data-dialog-filter.png
37-
:alt: Export data dialog
38-
:width: 70%
39-
4029
The top section of the export dialog displays the query
41-
entered in the query bar. If you did not specify a query in the query
42-
bar, you can specify a query here.
43-
30+
entered in the query bar.
4431
---
4532
title: Select document fields to include in your exported file.
4633
level: 4
4734
ref: select-export-fields
4835
content: |
36+
37+
You can choose to export :guilabel:`All Fields` or :guilabel:`Select fields in table`.
38+
In the query bar, you can also use the :guilabel:`Project` field to specify
39+
the fields to return or export.
40+
4941
Only fields that are checked are included in the exported file.
5042
5143
You can add document fields to include with the :guilabel:`Add Field`
5244
button if the field you want to include is not automatically detected.
5345
5446
.. figure:: /images/compass/export-data-dialog-2.png
47+
:figwidth: 450px
5548
:alt: Export data dialog, step 2
56-
:width: 70%
5749
5850
.. note::
5951
@@ -64,24 +56,45 @@ content: |
6456
For details on sampling, see :ref:`Sampling <sampling>`.
6557
6658
---
67-
title: Choose the appropriate file type.
59+
title: Select the appropriate file type.
6860
level: 4
6961
ref: click-file-type
7062
content: |
71-
Under :guilabel:`Select Export File Type`, select either
72-
:guilabel:`JSON` or :guilabel:`CSV`. If you select :guilabel:`JSON`,
73-
your data is exported to the target file as a comma-separated
74-
array of JSON objects.
63+
Under :guilabel:`Export File Type`, select either :guilabel:`JSON` or :guilabel:`CSV`.
64+
If you select :guilabel:`JSON`, you can expand the :guilabel:`Advanced JSON Format` dropdown
65+
and select from the following extended JSON formats:
7566
76-
Then, under :guilabel:`Output`, choose where to export the file to.
67+
.. list-table::
68+
:header-rows: 1
69+
:widths: 50, 50
7770
78-
.. figure:: /images/compass/export-data-dialog-3.png
79-
:alt: Export data dialog, step 3
80-
:width: 70%
71+
* - JSON Format
72+
- Description
73+
74+
* - Default Extended JSON
75+
- A string format that avoids any loss of BSON type information. This
76+
is the default |compass-short| setting.
77+
78+
* - Relaxed Extended JSON
79+
- A string format that emphasizes readability and interoperability at
80+
the expense of type preservation. That is, conversion from relaxed
81+
format to BSON can lose type information.
82+
83+
.. warning::
84+
85+
This format is not recommended for data integrity.
86+
87+
* - Canonical Extended JSON
88+
- A string format that emphasizes type preservation at the expense of
89+
readability and interoperability. That is, conversion from canonical
90+
to BSON will generally preserve type information except in certain
91+
specific cases.
8192
8293
---
8394
title: Click :guilabel:`Export`.
8495
level: 4
8596
ref: click-export
86-
content: ""
97+
content: |
98+
99+
Choose where to export the file and click :guilabel:`Select`.
87100
...

source/includes/steps-export.yaml

Lines changed: 34 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -14,62 +14,49 @@ content: |
1414
:doc:`Collections </collections>` tab or click the collection in the
1515
left-hand pane.
1616
---
17-
title: Click :guilabel:`Collection` in the top-level menu and select
18-
:guilabel:`Export Collection`.
17+
title: Click the :guilabel:`Export Data` dropdown and select :guilabel:`Export the full collection`.
1918
level: 4
2019
ref: export-collection
21-
content: |
22-
.. figure:: /images/compass/export-data-option-select.png
23-
:alt: Export data select menu
24-
25-
|compass-short| displays the following dialog:
26-
27-
.. figure:: /images/compass/export-data-dialog-1.png
28-
:alt: Export data dialog, step 1
29-
:width: 70%
30-
31-
The export dialog initially displays the query entered in the query
32-
bar prior to export, if applicable. If no query was specified, this
33-
section displays a ``find`` operation with no parameters, which
34-
returns all documents in the collection.
35-
36-
To ignore the query filter and export your entire collection, select
37-
:guilabel:`Export Full Collection` and click
38-
:guilabel:`Select Fields`.
39-
40-
---
41-
title: Select document fields to include in your exported file.
42-
level: 4
43-
ref: select-export-fields
44-
content: |
45-
Only fields that are checked are included in the exported file.
46-
47-
You can add document fields to include with the :guilabel:`Add Field`
48-
button if the field you want to include is not automatically detected.
49-
50-
.. figure:: /images/compass/export-data-dialog-2.png
51-
:alt: Export data dialog, step 2
52-
:width: 70%
53-
5420
---
55-
title: Choose a file type and export location.
21+
title: Select your file type.
5622
level: 4
5723
ref: click-file-type
5824
content: |
59-
Under :guilabel:`Select Export File Type`, select either
60-
:guilabel:`JSON` or :guilabel:`CSV`. If you select :guilabel:`JSON`,
61-
your data is exported to the target file as a comma-separated
62-
array.
63-
64-
Then, under :guilabel:`Output`, choose where to export the file to.
65-
66-
.. figure:: /images/compass/export-data-dialog-3.png
67-
:alt: Export data dialog, step 3
68-
:width: 70%
6925
26+
You can select either :guilabel:`JSON` or :guilabel:`CSV`. If you select
27+
:guilabel:`JSON`, you can expand the :guilabel:`Advanced JSON Format` dropdown
28+
and select from the following extended JSON formats:
29+
30+
.. list-table::
31+
:header-rows: 1
32+
:widths: 50, 50
33+
34+
* - JSON Format
35+
- Description
36+
37+
* - Default Extended JSON
38+
- A string format that avoids any loss of BSON type information. This
39+
is the default |compass-short| setting.
40+
41+
* - Relaxed Extended JSON
42+
- A string format that emphasizes readability and interoperability at
43+
the expense of type preservation. That is, conversion from relaxed
44+
format to BSON can lose type information.
45+
46+
.. warning::
47+
48+
This format is not recommended for data integrity.
49+
50+
* - Canonical Extended JSON
51+
- A string format that emphasizes type preservation at the expense of
52+
readability and interoperability. That is, conversion from canonical
53+
to BSON will generally preserve type information except in certain
54+
specific cases.
7055
---
7156
title: Click :guilabel:`Export`.
7257
level: 4
7358
ref: click-export
74-
content: ""
59+
content: |
60+
61+
Choose where to export the file and click :guilabel:`Select`.
7562
...

source/includes/steps-import.yaml

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,48 +15,27 @@ content: |
1515
left-hand pane.
1616
---
1717
title: Click the :guilabel:`Add Data` dropdown and select
18-
:guilabel:`Import File`.
18+
:guilabel:`Import JSON or CSV file`.
1919
level: 4
2020
ref: import-data
21-
content: |
22-
23-
.. figure:: /images/compass/add-data-button.png
24-
:alt: Add data button
25-
26-
|compass-short| displays the following dialog:
27-
28-
.. figure:: /images/compass/import-data-dialog.png
29-
:alt: Import data dialog
30-
:width: 70%
31-
3221
---
33-
title: Select the location of the source data file under
34-
:guilabel:`Select File`.
22+
title: Select the appropriate file type.
3523
level: 4
3624
ref: click-file-location
37-
content: ""
38-
39-
---
40-
title: Choose the appropriate file type.
41-
level: 4
42-
ref: choose-file-type
4325
content: |
4426
45-
Under :guilabel:`Select Input File Type`, select either
46-
:guilabel:`JSON` or :guilabel:`CSV`.
27+
Select either a JSON or CSV file to import and click :guilabel:`Select`.
4728
4829
If you are importing a CSV file, you may specify fields to import and
4930
the types of those fields under :guilabel:`Specify Fields and Types`.
50-
The default data type for all fields is string.
5131
5232
.. figure:: /images/compass/import-csv-options.png
33+
:figwidth: 450px
5334
:alt: Select fields to import from a CSV file
54-
:width: 70%
5535
5636
To exclude a field from a CSV file you are importing, uncheck the
5737
checkbox next to that field name. To select a type for a field, use
5838
the dropdown menu below that field name.
59-
6039
---
6140
title: Configure import options.
6241
level: 4

0 commit comments

Comments
 (0)