Add a Spark SQL data source to connect Quick BI to a Spark SQL database (version 3.1.2) over the public network or Alibaba Cloud VPC, and then analyze and visualize data in Quick BI.
Prerequisites
Ensure your network is connected:
To connect Quick BI with the Spark SQL database (version 3.1.2) over the public network, you should add Quick BI's IP address to the database's whitelist. For more information, see Security groups.
For internal network connections, use one of the following methods:
If the Spark SQL database is hosted on Alibaba Cloud ECS, establish a connection via Alibaba Cloud VPC.
Alternatively, deploy a jump server and create an SSH tunnel to access the database.
Retrieve the username and password for the user-created Spark SQL database (version 3.1.2).
Limits
The Spark SQL database must be version 3.1.2, and the Hive MetaStore used for underlying storage should be Hive 2.0 or higher.
Procedure
Log on to the Quick BI console.
Add a user-created Spark SQL data source by performing the following steps.
Navigate to the create data source interface via the create data source entry.
On the User-created Data Source tab, select the Spark SQL data source.

In the Configure Connection dialog box, configure the connection according to your business needs.

Name
Description
Display Name
The name displayed in the data source list.
Use a standard name without special characters or leading or trailing spaces.
Database Address
The IP address or domain name of the Spark SQL database.
Port
The port number of the database.
Database
The database name specified when deploying the Spark SQL database.
Username and Password
The username and password for the Spark SQL database. The username must have CREATE, INSERT, UPDATE, and DELETE permissions on the tables in the database.
VPC Data Source
Enable this option if the database uses Alibaba Cloud VPC.
Select "Instance" if the database is deployed on Alibaba Cloud ECS, or "CLB" if accessed through Classic Load Balancer (CLB).
Instance
Purchaser Accessid: The AccessKey ID of the purchaser of this instance.
For more information, see Create an AccessKey.
NoteEnsure that the AccessKey ID has Read permission on the destination instance. If you also have Write permission on the corresponding security group, the system automatically adds the whitelist. Otherwise, add it manually. For more information, see create a custom policy.
Purchaser Accesskey: The AccessKey Secret of the purchaser of this instance.
For more information, see Create an AccessKey.
Instance ID: The ECS instance ID. Log on to the ECS console and obtain the instance ID on the instance tab.
For more information, see view instance information.
Area: The area where the ECS instance is located. Log on to the ECS console and obtain the area in the upper left corner.
For more information, see view instance information.
CLB
Purchaser Accessid: The AccessKey ID of the CLB purchaser. Ensure that the account has Read permission on the CLB. Log on to the RAM console to obtain the AccessKey ID.
For more information, see view RAM user's AccessKey information.
Purchaser Accesskey: The AccessKey Secret corresponding to the AccessKey ID. Log on to the RAM console to obtain the AccessKey Secret.
For more information, see view RAM user's AccessKey information.
Instance ID: The instance ID of the CLB. Log on to the Server Load Balancer console and obtain the instance ID in the instance management list.
Area: The area where the instance is located. Log on to the Server Load Balancer console and obtain the area in the upper left corner of the instance management page.
SSH
If you select SSH, configure the following parameters:
Deploy a jump server and access the database through an SSH tunnel. Obtain the jump server details from O&M personnel or system administrators.
SSH Host: Enter the IP address of the jump server.
SSH Username: The username for logging on to the jump server.
SSH Password: The password for the jump server username.
SSH Port: The port of the jump server. Default value: 22.
For more information, see Use OpenSSH or Xshell.
Initialize SQL
When enabled, the specified SQL statement runs after each data source connection is initialized.
Only SET statements are supported, separated by semicolons.
Click Connection Test to verify the data source connectivity.

After the test succeeds, click OK to add the data source.
The new data source appears in the data source list.
What to Do next
After the data source is added, you can create datasets and analyze data.
To add data tables from the Spark SQL database or custom SQL to Quick BI, see create and manage datasets.
To add visualization charts and analyze data, see create a dashboard and visualization chart overview.
For advanced data analysis, see drill settings and display.