By adding a MongoDB data source in Quick BI, you can connect to a MongoDB database and analyze data within the Quick BI console. Quick BI supports connections to MongoDB databases over the Internet or through a Virtual Private Cloud (VPC). This topic guides you through the process of adding a user-created MongoDB data source.
Step 1: Install MongoDB Connector for BI
This section explains how to install the MongoDB Connector for BI on a Linux operating system.
Download the MongoDB Connector for BI.
Select the Platform corresponding to your operating system.
Decompress the downloaded package.

Start the mongosqld service.
Note
Add the IP address of the ECS instance running the mongosqld service to the MongoDB database's whitelist.
./mongosqld --mongo-uri <Mongo_address> --auth -u <Username> -p <Password> --schemaRefreshIntervalSecs <Schema_refresh> --addr <Binding_address>
Parameter | Description |
Mongo_address
| The endpoint of the MongoDB database. |
Username
| The username of the account that has the root permissions. |
Password
| The password of the account that has the root permissions. |
Schema_refresh
| The interval at which the information about the database and collections in MongoDB is synchronized to the memory. |
Binding_address
| The port number. In most cases, this parameter is set to the internal or public endpoint of the machine. For example, 0.0.0.0:3307 Note You can set different port numbers by starting multiple processes to connect multiple instances on a single machine. |
If you encounter the error ./mongodrdl: error while loading shared libraries: lib
ssl
.so.1.1: cannot open shared object file: No such file or directory
after execution, it indicates that libssl is not installed. Follow the necessary steps to resolve this issue.
# Download from the official website
wget https:
# Compile and install
tar -xvf openssl-1.1.1e.tar.gz
cd openssl-1.1.1e
./config shared --openssldir=/usr/local/openssl --prefix=/usr/local/openssl
make && make install
# Configuration
echo "/usr/local/lib64/" >> /etc/ld.so.conf
ldconfig
# Verification
openssl version
Step 2: Add a user-created data source MongoDB
Log on to the Quick BI console.
Follow the steps illustrated below to add a user-created data source.
Navigate to the data source creation page via the data source creation entry.
Click Show more.

Select the MongoDB data source.

In the Configure Connection dialog box, configure the connection according to your business needs.
Name | Description |
Display Name | The display name in the datasource config list. The name cannot contain special characters or start or end with spaces. |
Database Address | The database address where the MongoDB Connector for BI service is deployed, including the IP address or domain name. You must install the MongoDB Connector for BI before you connect to the database. |
Port | The port number of MongoDB Connector for BI. |
Database | The name of the MongoDB database that is customized when you deploy the database. |
Username and Password | The username and password that are used to access the database. Make sure that the username has the create, insert, update, and delete permissions on the tables in the database. |
VPC Data Source | Select VPC Data Source and configure the following parameters only if the connector is deployed on an Alibaba Cloud ECS instance and the network type is Alibaba Cloud VPC: Purchaser Accessid: The AccessKey ID of the purchaser of the instance. For more information, see obtain an AccessKey. Note Make sure that the AccessKey ID has the Read permission on the destination instance. If the AccessKey ID has the Write permission on the corresponding security group, the whitelist is automatically added. Otherwise, you must manually add the whitelist. For more information, see create a custom policy. Purchaser Accesskey: The AccessKey Secret of the purchaser of the instance. For more information, see obtain an AccessKey. Instance ID: The ID of the ECS instance. Log on to the ECS console and obtain the instance ID on the Instances tab. For more information, see view instance information. Area: The area where the ECS instance is located. For more information, see view instance information.
|
SSH | If you select SSH, you must configure the following parameters: You can deploy a jump server and access the database over an SSH tunnel. To obtain the jump server information, contact O&M personnel or system administrators. SSH Host: Enter the IP address of the jump server. SSH Username: The username that is used to log on to the jump server. SSH Password: The password that corresponds to the username that is used to log on to the jump server. SSH Port: The port number of the jump server. Default value: 22.
For more information, see log on to a Linux instance by using password authentication. |
Click Connection Test to verify the data source connectivity.

Once the test is successful, click OK to finalize the data source addition.
What to Do next
After creating a data source, you can proceed to create datasets and analyze data.