MongoDB Atlas
MongoDB Atlas is a multi-cloud application data platform provided by MongoDB
This article describes how to add MongoDB Atlas to ClickPipes Cloud
Supported Versions
MongoDB Atlas 5.x, 6.x, 7.x
Supported Data Types
Category | Data Types |
---|---|
Strings and Code | String, JavaScript, Symbol |
Numeric Types | Double, Int32, Int64, Decimal128 |
Document and Array | Document, Array |
Binary and ObjectId | Binary, ObjectId |
Boolean Type | Boolean |
Date and Timestamp | Date, Timestamp |
Special Types | Min Key, Max Key, Null |
Preparations
Before establishing the connection, it is essential to complete the necessary preparations outlined in the provided article. These preparations may include authorizing an account and performing other relevant steps to ensure a smooth and secure connection.
Log in to MongoDB Atlas.
Set up network access control to ensure network connectivity.
In the left navigation panel, click Network Access.
On the right, click ADD IP ADDRESS.
In the pop-up dialog, fill in the public address of the ClickPipes Engine (CIDR format) and click Confirm.
Create an account and grant permissions for database connectivity.
In the left navigation panel, click Database Access.
On the right side of the page, click ADD NEW DATABASE USER.
In the pop-up dialog, select the authentication method and grant permissions.
In this case, we will use password authentication as an example to demonstrate the operation process. The permission selection instructions are as follows.
* **As a Source Database**: Select **Built-in Role** as **Only read any database**.
* **As a Target Database**: Select **Built-in Role** for **Read and Write to any Database**.
Click Add User.
Gets database connection information.
In the left navigation panel, click Database.
Locate the target database and click Connect.
In the pop-up dialog, select Connect to your application to get connection information, which will be used when connecting to the database.
Source Config
Connection Information Settings
Connection name: Fill in a unique name that has business significance.
Connection type: Supports MongoDB Atlas as a source or target database.
Connection method: Fixed in URI Mode.
Database URI: Fill in the Database URI connection information, and URI should include the username and password, which are concatenated in the format.
For example, the connection string may look like:
mongodb+srv://clickPipes:click123456@cluster****.mongodb.net/demodata?retryWrites=true&w=majority
tipBe sure to set the database you want to connect in the connection string, for example, in the above example set to demodata, otherwise, it will cause the connection to fail and prompt for an error: 'datbaseName can not be null'.
Connect using TLS/SSL: Choose how you want to connect:
- TSL/SSL connection: In cases where your database is located in an inaccessible subnet, ClickPipes Cloud offers the option to establish a connection through a separate server within the network. This server acts as a TSL/SSL channel to facilitate the connection to the database. This method enables connectivity to the database even when it is in a subnet that would otherwise be inaccessible.
- Direct connection: ClickPipes Cloud will connect directly to the database and you need to set up security rules to allow access.