package mongodb
Type Members
-
class
MongoDbOutputWriter extends DatasourceWriter
A custom MongoDbOutputWriter class that extends the DatasourceWriter.
A custom MongoDbOutputWriter class that extends the DatasourceWriter. This class is responsible for writing data from a DataFrame to a MongoDB collection based on the specified options.
-
case class
MongoDbWriterOptions(nodes: List[String], subprotocol: String, database: String, table: String, username: String, password: String, saveMode: SaveMode, options: Map[String, Any], connectionProps: Option[String]) extends Product with Serializable
A case class representing the MongoDB writer options required for writing data from a DataFrame to a MongoDB collection.
A case class representing the MongoDB writer options required for writing data from a DataFrame to a MongoDB collection.
- nodes
The list of MongoDB nodes in the format "host1:port1,host2:port2,...".
- subprotocol
The subprotocol for the MongoDB connection (e.g., "mongodb" or "mongodb+srv").
- database
The name of the MongoDB database where data will be written.
- table
The name of the MongoDB collection where data will be written.
- username
The username for authenticating the MongoDB connection.
- password
The password for authenticating the MongoDB connection.
- saveMode
The SaveMode for writing data to MongoDB (e.g., SaveMode.Append, SaveMode.Overwrite, etc.).
- options
Additional options to be passed to the MongoDB writer (default: Map.empty).
- connectionProps
Optional connection properties for building the MongoDB connection URL (default: None).