Qubit Docs العربية

MongoDB

Connect a MongoDB database, including MongoDB Atlas, so Qubit can copy its collections on a schedule. Each collection becomes a table.

Before you start

  • Create a database user for Qubit with the read role on the database you want to use.
  • For MongoDB Atlas, copy the mongodb+srv:// connection string from Connect in the Atlas console, and make sure the cluster's network access list allows connections from Qubit's servers.

Connect MongoDB

  1. Open Data Catalog from the sidebar, click Add Data, then choose Connect a database.
  2. On the New Data Source page, click MongoDB. It is under Databases.
  3. Enter a Connection Name.
  4. Fill in the connection details:
    • Host or connection URI: a hostname, or a full mongodb:// or mongodb+srv:// URI. A URI can include the user name and password.
    • Port: defaults to 27017. Not needed with a mongodb+srv:// URI.
    • Database: the database to read. Required.
    • User and Password: the database user, unless they are already in the URI.
    • Authentication database: only if the user is defined in a different database from the one you sync, for example admin.
    • Use TLS/SSL: required by MongoDB Atlas and most hosted clusters. It is turned on automatically for mongodb+srv:// URIs.
  5. Choose a Sync Schedule. The default is Daily.
  6. Click Create.

After you connect

Qubit checks that the required fields are filled in, saves the connection, and starts the first sync. It confirms that it can reach the database during that sync.

To check the connection at any time, open its menu in the Data Catalog and choose Test connection. If Last sync shows Failed, hover over it to see the reason, correct the details with Edit, then choose Sync now.

If authentication fails even though the password is right, set Authentication database to the database where the user was created.