@@ -31,40 +31,57 @@ The following options for writing to MongoDB are available:
31
31
* - Property name
32
32
- Description
33
33
34
- * - ``mongoClientFactory``
35
- - | MongoClientFactory configuration key.
36
- | You can specify a custom implementation which must implement the
37
- ``com.mongodb.spark.sql.connector.connection.MongoClientFactory``
38
- interface.
39
- |
40
- | **Default:** ``com.mongodb.spark.sql.connector.connection.DefaultMongoClientFactory``
34
+ * - ``collection``
35
+ - | **Required.**
36
+ | The collection name configuration.
41
37
42
38
* - ``connection.uri``
43
39
- | **Required.**
44
40
| The connection string configuration key.
45
41
|
46
42
| **Default:** ``mongodb://localhost:27017/``
47
43
44
+ * - ``convertJson``
45
+ - | When ``true``, the connector parses the string and converts extended JSON
46
+ into BSON.
47
+ |
48
+ | **Default:** ``false``
49
+
48
50
* - ``database``
49
51
- | **Required.**
50
52
| The database name configuration.
51
53
52
- * - ``collection``
53
- - | **Required.**
54
- | The collection name configuration.
54
+ * - ``idFieldList``
55
+ - | Field or list of fields by which to split the collection data. To
56
+ specify more than one field, separate them using a comma as shown
57
+ in the following example:
55
58
59
+ .. code-block:: none
60
+ :copyable: false
61
+
62
+ "fieldName1,fieldName2"
63
+
64
+ | **Default:** ``_id``
65
+
66
+ * - ``ignoreNullValues``
67
+ - | When ``true``, the connector ignores any ``null`` values when writing,
68
+ including ``null`` values in arrays and nested documents.
69
+ |
70
+ | **Default:** ``false``
56
71
57
72
* - ``maxBatchSize``
58
73
- | Specifies the maximum number of operations to batch in bulk
59
74
operations.
60
-
61
75
|
62
76
| **Default:** ``512``
63
77
64
- * - ``ordered``
65
- - | Specifies whether to perform ordered bulk operations.
78
+ * - ``mongoClientFactory``
79
+ - | MongoClientFactory configuration key.
80
+ | You can specify a custom implementation which must implement the
81
+ ``com.mongodb.spark.sql.connector.connection.MongoClientFactory``
82
+ interface.
66
83
|
67
- | **Default:** ``true ``
84
+ | **Default:** ``com.mongodb.spark.sql.connector.connection.DefaultMongoClientFactory ``
68
85
69
86
* - ``operationType``
70
87
- | Specifies the type of write operation to perform. You can set
@@ -83,26 +100,19 @@ The following options for writing to MongoDB are available:
83
100
|
84
101
| **Default:** ``replace``
85
102
86
- * - ``idFieldList``
87
- - | Field or list of fields by which to split the collection data. To
88
- specify more than one field, separate them using a comma as shown
89
- in the following example:
90
-
91
- .. code-block:: none
92
- :copyable: false
93
-
94
- "fieldName1,fieldName2"
95
-
96
- | **Default:** ``_id``
103
+ * - ``ordered``
104
+ - | Specifies whether to perform ordered bulk operations.
105
+ |
106
+ | **Default:** ``true``
97
107
98
- * - ``writeConcern.w``
99
- - | Specifies ``w``, a write-concern option to request acknowledgment
100
- that the write operation has propogated to a specified number of
101
- MongoDB instances. For a list
102
- of allowed values for this option, see :manual:`WriteConcern
103
- </reference/write-concern/#w-option>` in the MongoDB manual.
108
+ * - ``upsertDocument``
109
+ - | When ``true``, replace and update operations will insert the data
110
+ if no match exists.
104
111
|
105
- | **Default:** ``1``
112
+ | For time series collections, you must set ``upsertDocument`` to
113
+ ``false``.
114
+ |
115
+ | **Default:** ``true``
106
116
107
117
* - ``writeConcern.journal``
108
118
- | Specifies ``j``, a write-concern option to enable request for
@@ -114,6 +124,15 @@ The following options for writing to MongoDB are available:
114
124
guide on the
115
125
:manual:`WriteConcern j option </reference/write-concern/#j-option>`.
116
126
127
+ * - ``writeConcern.w``
128
+ - | Specifies ``w``, a write-concern option to request acknowledgment
129
+ that the write operation has propogated to a specified number of
130
+ MongoDB nodes. For a list
131
+ of allowed values for this option, see :manual:`WriteConcern
132
+ </reference/write-concern/#w-option>` in the MongoDB manual.
133
+ |
134
+ | **Default:** ``1``
135
+
117
136
* - ``writeConcern.wTimeoutMS``
118
137
- | Specifies ``wTimeoutMS``, a write-concern option to return an error
119
138
when a write operation exceeds the number of milliseconds. If you
@@ -123,21 +142,6 @@ The following options for writing to MongoDB are available:
123
142
guide on the
124
143
:manual:`WriteConcern wtimeout option </reference/write-concern/#wtimeout>`.
125
144
126
- * - ``upsertDocument``
127
- - | When ``true``, replace and update operations will insert the data
128
- if no match exists.
129
- |
130
- | For time series collections, you must set ``upsertDocument`` to
131
- ``false``.
132
- |
133
- | **Default:** ``true``
134
-
135
- * - ``convertJson``
136
- - | When ``true``, the connector parses the string and converts extended JSON
137
- into BSON.
138
- |
139
- | **Default:** ``false``
140
-
141
145
.. _configure-output-uri:
142
146
143
147
``connection.uri`` Configuration Setting
0 commit comments