MongoDB
Sink plugin : MongoDB [Spark]
Descriptionâ
Write data to MongoDB
Optionsâ
name | type | required | default value |
---|---|---|---|
writeconfig.uri | string | yes | - |
writeconfig.database | string | yes | - |
writeconfig.collection | string | yes | - |
writeconfig.* | string | no | - |
writeconfig.uri [string]â
uri to write to mongoDB
writeconfig.database [string]â
database to write to mongoDB
writeconfig.collection [string]â
collection to write to mongoDB
writeconfig.* [string]â
More other parameters can be configured here, see MongoDB Configuration for details, see the Output Configuration section. The way to specify parameters is to add a prefix to the original parameter name writeconfig.
For example, the way to set localThreshold
is writeconfig.localThreshold=20
. If you do not specify these optional parameters, the default values of the official MongoDB documentation will be used.
Examplesâ
mongodb {
writeconfig.uri = "mongodb://username:password@127.0.0.1:27017/test_db"
writeconfig.database = "test_db"
writeconfig.collection = "test_collection"
}