Connect Quick BI to an Alibaba Cloud RDS for PostgreSQL database as a data source. Once connected, you can analyze and visualize your data in Quick BI. This topic describes how to add an RDS for PostgreSQL data source over the public network or through an Alibaba Cloud VPC.
Prerequisites
You have created an RDS for PostgreSQL instance. For more information, see Create an RDS for PostgreSQL instance.
Background information
You can add an Alibaba Cloud RDS for PostgreSQL database as a cloud data source in Quick BI for data analysis.
You can connect Quick BI to an RDS for PostgreSQL data source over the public network or through an Alibaba Cloud VPC. The configuration steps differ for each network type, as shown in the following figure.
To prevent connection failures, you must add the IP addresses for your Quick BI environment to the data source's whitelist. For more information about how to configure a whitelist, see Set up a whitelist.
Limitations
Only workspace administrators and developers can add data sources.
Quick BI supports PostgreSQL 8.2 and later.
Procedure
Log on to the Quick BI console.
Add a data source by performing the following steps:
Go to the page for creating data sources. For more information, see Create a data source.
On the Alibaba Cloud Databases tab, select RDS for PostgreSQL.

In the Configure Connection dialog box, configure the following parameters.

Parameter
Description
Display Name
The name that appears in the data source list.
Enter a name that follows your organization's naming conventions. The name cannot contain special characters or leading or trailing spaces.
Endpoint and Port
The endpoint and port of your PostgreSQL database. If you are using a VPC data source, enter the internal endpoint and port. Otherwise, enter the public endpoint and port.
To obtain this information, log on to the RDS console. In the Basic Information section of your instance, click View Connection Details to find the Internal and Public Endpoints and Internal and Public Ports.

If a public endpoint is not displayed, click Apply for Public Endpoint. For more information, see View or change connection endpoints and ports.

Database
The name of the database that you created in your PostgreSQL instance.
To find this information, log on to the RDS console. In the Database Management section, find the Database Name.

Schema
The schema name of your PostgreSQL database.
Username and Password
The username and password for your PostgreSQL database.
VPC Data Source
If you are connecting through an Alibaba Cloud VPC, select VPC Data Source and configure the following parameters:
AccessKey ID and AccessKey Secret: The AccessKey ID and AccessKey Secret of a RAM user with management permissions on the target PostgreSQL database. The user account must have at least read permissions for the target instance. If the account also has write permissions, Quick BI automatically adds its IP addresses to the database whitelist. Otherwise, you must add them manually. For more information, see Create a custom policy.
You can obtain the AccessKey ID and AccessKey Secret from the RAM console.

Instance ID and Region: The ID of your PostgreSQL instance and the region where it is located.

NoteIf you select a VPC data source, the database endpoint and port must be the internal endpoint and internal port.
SSL
If your data source uses SSL, select this option to encrypt data in transit.
Initial SQL
If you enable this option, you can specify SQL statements that run automatically after Quick BI connects to the data source.
Only
SETstatements are allowed. Separate multiple statements with semicolons (;).Enable File Upload Entry
When enabled, you can upload files to this data source.
Click Test Connection to verify the connection.

After the test is successful, click OK to add the data source.
Next steps
After you create the data source, you can create datasets and start analyzing your data.
Create datasets from tables or custom SQL queries in your PostgreSQL database. For more information, see Create a dataset.
Add charts to a dashboard to visualize and analyze your data. For more information, see Create a dashboard and Overview of chart types.
Perform in-depth analysis using the drill-down feature. For more information, see Step 3: Configure and use the drill-down feature.



