Mongo Db
A detailed overview of the MongoSource and MongoDestination.
MongoSource
The MongoSource
let you read data from MongoDb. Serialization from the json into your data object will use the default deserialization build-in in the MongoDb C# driver (using the BsonSerializer
).
If you want to change the default deserialization, you can use the static classes provided by the driver .
Example
Filter
You can add a filter to get only particular data. When the filter is applied, the find options are used to add additional limitation, e.g. the batch size for the filtering.
MongoDestination
The MongoDestination
will write your incoming data as json into a collection in MongoDb. The default Bson serializtion from the MongoDb C# driver is used.
Using dynamic objects
The MonogSource
and MongoDestination
support both the ExpandoObject
.
Reuse existing mongo clients
If you provide a connection string (and database name), a new MongoClient is instantiated when executing the data flow. If you want to reuse an existing MongoClient (which is recommended if you already have one “ready”), you can pass this to the DbClient property.
The DbClient
property is available on the MongoSource
and MongoDestination
.