@@ -55,7 +55,6 @@ Versioning
55
55
.. note:: Quick links to older documentation
56
56
57
57
- :v4.2:`MongoDB 4.2 mongoimport </reference/program/mongoimport>`
58
- - :v4.0:`MongoDB 4.0 mongoimport </reference/program/mongoimport>`
59
58
60
59
This documentation is for version ``{+release+}`` of |tool-binary|.
61
60
@@ -83,7 +82,7 @@ Installation
83
82
Syntax
84
83
------
85
84
86
- The :binary:`~bin.mongoimport` command has the following form :
85
+ The :binary:`~bin.mongoimport` command has the following syntax :
87
86
88
87
.. code-block:: sh
89
88
@@ -121,7 +120,7 @@ Encoding
121
120
~~~~~~~~
122
121
123
122
:binary:`~bin.mongoimport` only supports data files that are UTF-8 encoded.
124
- Using other encodings will produce errors.
123
+ Using other encodings produces errors.
125
124
126
125
FIPS
127
126
~~~~
@@ -312,12 +311,11 @@ Options
312
311
313
312
Specifies the password to de-crypt the certificate-key file (i.e.
314
313
:option:`--sslPEMKeyFile`). Use the :option:`--sslPEMKeyPassword` option only if the
315
- certificate-key file is encrypted. In all cases, the :program:`mongoimport` will
316
- redact the password from all logging and reporting output.
314
+ certificate-key file is encrypted. In all cases, the :program:`mongoimport` redacts the password from all logging and reporting output.
317
315
318
316
If the private key in the PEM file is encrypted and you do not specify
319
- the :option:`--sslPEMKeyPassword` option, the :program:`mongoimport` will prompt for a passphrase. See
320
- :ref:`ssl-certificate-password`.
317
+ the :option:`--sslPEMKeyPassword` option, the :program:`mongoimport`
318
+ prompts for a passphrase. See :ref:`ssl-certificate-password`.
321
319
322
320
.. include:: /includes/extracts/uri-used-with-sslpemkeypassword.rst
323
321
@@ -340,8 +338,8 @@ Options
340
338
341
339
Bypasses the validation checks for server certificates and allows
342
340
the use of invalid certificates. When using the
343
- :setting:`~net.ssl.allowInvalidCertificates` setting, MongoDB logs as a
344
- warning the use of the invalid certificate .
341
+ :setting:`~net.ssl.allowInvalidCertificates` setting, MongoDB logs a
342
+ warning for invalid certificates .
345
343
346
344
.. include:: /includes/extracts/ssl-facts-invalid-cert-warning-clients.rst
347
345
@@ -453,7 +451,7 @@ Options
453
451
.. option:: --collection=<collection>, -c=<collection>
454
452
455
453
Specifies the collection to import. If you do not specify
456
- :option:`--collection`, :binary:`~bin.mongoimport` takes the
454
+ :option:`--collection`, :binary:`~bin.mongoimport` reads the
457
455
collection name from the input filename, omitting the file's
458
456
extension if it has one.
459
457
@@ -468,7 +466,7 @@ Options
468
466
:option:`--fields` with :option:`--columnsHaveTypes`.
469
467
470
468
If you attempt to include :option:`--fields` when importing JSON data,
471
- :program:`mongoimport` will return an error. :option:`--fields` is only for :term:`CSV`
469
+ :program:`mongoimport` returns an error. :option:`--fields` is only for :term:`CSV`
472
470
or :term:`TSV` imports.
473
471
474
472
@@ -483,7 +481,7 @@ Options
483
481
:option:`--fieldFile` with :option:`--columnsHaveTypes`.
484
482
485
483
If you attempt to include :option:`--fieldFile` when importing JSON data,
486
- :program:`mongoimport` will return an error. :option:`--fieldFile` is only for :term:`CSV`
484
+ :program:`mongoimport` returns an error. :option:`--fieldFile` is only for :term:`CSV`
487
485
or :term:`TSV` imports.
488
486
489
487
@@ -495,7 +493,7 @@ Options
495
493
496
494
497
495
If you attempt to include :option:`--ignoreBlanks` when importing JSON data,
498
- :program:`mongoimport` will return an error. :option:`--ignoreBlanks` is only for :term:`CSV`
496
+ :program:`mongoimport` returns an error. :option:`--ignoreBlanks` is only for :term:`CSV`
499
497
or :term:`TSV` imports.
500
498
501
499
@@ -531,12 +529,12 @@ Options
531
529
532
530
If using :option:`--type csv <mongoimport --type>` or :option:`--type
533
531
tsv <mongoimport --type>`, uses the first line as field names.
534
- Otherwise, :binary:`~bin.mongoimport` will import the first line as a
532
+ Otherwise, :binary:`~bin.mongoimport` imports the first line as a
535
533
distinct document.
536
534
537
535
538
536
If you attempt to include :option:`--headerline` when importing JSON data,
539
- :program:`mongoimport` will return an error. :option:`--headerline` is only for :term:`CSV`
537
+ :program:`mongoimport` returns an error. :option:`--headerline` is only for :term:`CSV`
540
538
or :term:`TSV` imports.
541
539
542
540
@@ -577,7 +575,7 @@ Options
577
575
is interpreted as a document key, and not an array index.
578
576
579
577
If using the :option:`--ignoreBlanks` option with
580
- :option:`--useArrayIndexFields`, :program:`mongoimport` will log an
578
+ :option:`--useArrayIndexFields`, :program:`mongoimport` returns an
581
579
error if you attempt to import a document that contains a
582
580
blank value (e.g. ``""``) for an array index field.
583
581
@@ -608,23 +606,23 @@ Options
608
606
609
607
* - ``insert``
610
608
611
- - Insert the documents in the import file. :program:`mongoimport` will log
612
- an error if you attempt to import a document that contains a
613
- duplicate value for a field with a :ref:`unique index
614
- <index-type-unique>`, such as ``_id``.
609
+ - Insert the documents in the import file.
610
+ :program:`mongoimport` returns an error if you attempt to
611
+ import a document that contains a duplicate value for a field
612
+ with a :ref:`unique index <index-type-unique>`, such as ``_id``.
615
613
616
614
* - ``upsert``
617
615
618
616
- Replace existing documents in the database with matching
619
617
documents from the
620
- import file. :program:`mongoimport` will insert all other
618
+ import file. :program:`mongoimport` inserts all other
621
619
documents. :ref:`ex-mongoimport-upsert` describes how to
622
620
use :option:`--mode` ``upsert``.
623
621
624
622
* - ``merge``
625
623
626
624
- Merge existing documents that match a document in the import file with
627
- the new document. :program:`mongoimport` will insert all other documents.
625
+ the new document. :program:`mongoimport` inserts all other documents.
628
626
:ref:`ex-mongoimport-merge` describes how to use :option:`--mode`
629
627
``merge``.
630
628
@@ -650,7 +648,7 @@ Options
650
648
another field or field combination can uniquely identify
651
649
documents as a basis for performing upsert operations.
652
650
653
- If you do not specify a field, :option:`--upsertFields` will upsert
651
+ If you do not specify a field, :option:`--upsertFields` upserts
654
652
on the basis of the ``_id`` field.
655
653
656
654
To ensure adequate performance, indexes should exist for the
@@ -842,7 +840,7 @@ Options
842
840
See :ref:`example-csv-import-types` for sample usage.
843
841
844
842
If you attempt to include :option:`--columnsHaveTypes` when importing JSON data,
845
- :program:`mongoimport` will return an error. :option:`--columnsHaveTypes` is only for :term:`CSV`
843
+ :program:`mongoimport` returns an error. :option:`--columnsHaveTypes` is only for :term:`CSV`
846
844
or :term:`TSV` imports.
847
845
848
846
@@ -1041,7 +1039,7 @@ the fields to match against.
1041
1039
.. note::
1042
1040
1043
1041
With :option:`--mode <mongoimport --mode>` ``delete``,
1044
- :binary:`~bin.mongoimport` will only delete one existing document per
1042
+ :binary:`~bin.mongoimport` only deletes one existing document per
1045
1043
match. Ensure that documents from the import file match a single
1046
1044
existing document from the database.
1047
1045
@@ -1147,7 +1145,7 @@ either: :option:`--fields <mongoimport --fields>`, :option:`--fieldFile
1147
1145
Specify field names and data types in the form
1148
1146
``<colName>.<type>(<arg>)``.
1149
1147
1150
- For example, a ``/example/file.csv`` file contains the following data:
1148
+ For example, ``/example/file.csv`` contains the following data:
1151
1149
1152
1150
.. code-block:: none
1153
1151
@@ -1258,9 +1256,8 @@ shell:
1258
1256
export AWS_SECRET_ACCESS_KEY='<aws secret access key>'
1259
1257
export AWS_SESSION_TOKEN='<aws session token>'
1260
1258
1261
- Syntax for setting environment variables in other shells will be
1262
- different. Consult the documentation for your platform for more
1263
- information.
1259
+ Other shells use different syntax to set environment variables. Consult
1260
+ the documentation for your platform for more information.
1264
1261
1265
1262
You can verify that these environment variables have been set with the
1266
1263
following command:
0 commit comments