Back to destination list
mongodb
Official

MongoDB

This destination plugin lets you sync data from any CloudQuery source to a MongoDB database

Publisher

cloudquery

Repositorygithub.com
Latest version

v2.5.14

Type

Destination

Platforms
Date Published

Price

Free

Overview #

MongoDB Destination Plugin

This destination plugin lets you sync data from any CloudQuery source to a MongoDB database.
Supported database versions:
  • MongoDB >= 3.6 (The same minimum version supported by the official Go driver)

Configuration #

Example #

This example configures a MongoDB destination, located at localhost:27017. The (top level) spec section is described in the Destination Spec Reference.
kind: destination
spec:
  name: "mongodb"
  path: "cloudquery/mongodb"
  registry: "cloudquery"
  version: "v2.5.14"
  spec:
    # required, a connection string in the format mongodb://localhost:27017
    connection_string: "${MONGODB_CONNECTION_STRING}"
    # required, the name of the database to sync to
    database: "${MONGODB_DATABASE_NAME}"
    # Optional parameters:
    # batch_size: 10000 # 10K
    # batch_size_bytes: 4194304 # 4 MiB
The MongoDB destination utilizes batching, and supports batch_size and batch_size_bytes.

MongoDB Spec #

This is the (nested) spec used by the MongoDB destination Plugin.
  • connection_string (string) (required)
    MongoDB URI as described in the official MongoDB documentation.
    Example connection strings:
    • "mongodb://username:password@hostname:port/database" basic connection
    • "mongodb+srv://username:[email protected]/database" connecting to a MongoDB Atlas cluster
    • "mongodb://localhost:27017/myDatabase?authSource=admin" specify authentication source
  • database (string) (required)
    Database to sync the data to.
  • batch_size (integer) (optional) (default: 1000)
    Maximum amount of items that may be grouped together to be written in a single write.
  • batch_size_bytes (integer) (optional) (default: 4194304 (= 4 MiB))
    Maximum size of items that may be grouped together to be written in a single write.


Join our mailing list

Subscribe to our newsletter to make sure you don't miss any updates.

Legal

© 2024 CloudQuery, Inc. All rights reserved.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve. You can always opt out later via the link in the footer.