-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
41 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Specifying Properties in ``connection.uri`` | ||
------------------------------------------- | ||
|
||
If you're using ``SparkConf``, you can specify all the previous settings either | ||
individually or combined in the write ``connection.uri`` setting. | ||
|
||
The following code examples show how to specify ``connection.uri``, | ||
``database``, and ``collection`` settings both separately and in ``connection.uri``: | ||
|
||
- Separately: | ||
|
||
.. code:: cfg | ||
spark.mongodb.write.connection.uri=mongodb://127.0.0.1/ | ||
spark.mongodb.write.database=test | ||
spark.mongodb.write.collection=myCollection | ||
- In ``connection.uri``: | ||
|
||
.. code:: cfg | ||
spark.mongodb.write.connection.uri=mongodb://127.0.0.1/test.myCollection | ||
.. important:: connection.uri Takes Precedence | ||
|
||
If you specify a setting in both the ``connection.uri`` and on its own line, | ||
the ``connection.uri`` setting takes precedence. | ||
For example, in the following configuration, the connection | ||
database is ``foobar``: | ||
|
||
.. code:: cfg | ||
spark.mongodb.write.connection.uri=mongodb://127.0.0.1/foobar | ||
spark.mongodb.write.database=bar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters