Module chewdata::connector::mongodb

source ·
Expand description

Read and write data into mongodb database.

§Configuration

keyaliasDescriptionDefault ValuePossible Values
type-Required in order to use this connectormongodbmongodb / mongo
endpoint-Endpoint of the connectornullString
databasedbThe database namenullString
collectioncolThe collection namenullString
query-Query to find an element into the collectionnullObject
find_optionsprojectionSpecifies the fields to return in the documents that match the query filter. To return all fields in the matching documents, omit this parameter. For details, see ProjectionnullObject
update_options-Options apply during the update)nullObject
paginator-Paginator parameters.crate::connector::paginator::mongodb::offset::Offsetcrate::connector::paginator::mongodb::offset::Offset / crate::connector::paginator::mongodb::cursor::Cursor
countercountUse to find the total of elements in the resource. used for the paginator[crate::connector::counter::psql::metadata::Metadata][crate::connector::counter::psql::metadata::Metadata]

§Examples

[
    {
        "type": "w",
        "connector":{
            "type": "mongodb",
            "endpoint": "mongodb://admin:admin@localhost:27017",
            "db": "tests",
            "collection": "test",
            "update_options": {
                "upsert": true
            }
        },
        "concurrency_limit":3
    }
]

Structs§