The PostgreSQL data source is used to connect the ApsaraDB for PostgreSQL database to the Quick BI. After the connection is successful, you can analyze and display data on the Quick BI. You can connect a Quick BI to an ApsaraDB RDS for PostgreSQL instance over the Internet or a virtual private cloud (VPC). This topic describes how to add an ApsaraDB RDS for PostgreSQL data source.
Prerequisites
An ApsaraDB RDS for PostgreSQL database is created.
Background information
If you are using an Alibaba Cloud PostgreSQL database, you can add a cloud data source PostgreSQL when connecting to the Quick BI for data analysis.
To prevent data access failures due to the whitelist of a data source, you must add the Quick BI IP addresses of different Quick BI network environment to the whitelist of the data source. For more information, see Configure a whitelist.
Limits
Only workspace administrators and developers can add data sources.
PostgreSQL 8.2 or later is supported.
Procedure
Log on to the Quick BI console.
Follow the instructions in the following figure to add a data source
Go to the Create Data Source page.
Select PostgreSQL Data Source.
Select Alibaba Cloud for Data Source Type.
In the Configure Connection dialog box, configure the following parameters based on your business requirements.
Feature
Description
Name
The name of the data source. The name is displayed in the data source list.
The name cannot contain special characters or start or end with spaces.
Database Address and Port Number
The public endpoint and port number of the PostgreSQL database. If you use a VPC data source, you must enter the internal endpoint and port number of the database.
Log on to the ApsaraDB RDS console. In the Basic Information section, click View Connection Details to obtain the database endpoint. Example: rm-xxxxxxxxxxxxxxxxxx.pg.rds.aliyuncs.com.
If no public endpoint is displayed, click Apply for a public endpoint to obtain the endpoint and port number. For more information, see View or modify the endpoint and port number.
Instance
The name of the PostgreSQL database.
Log on to the ApsaraDB RDS console. On the Databases page, obtain the name of the database.
Schema
The schema name of the PostgreSQL database.
Username and Password
The username and password that are used to log on to the PostgreSQL database.
VPC Data Source
If you use a VPC, select VPC Data Source and configure the following parameters:
AccessKey ID and AccessKey: the AccessKey ID and AccessKey secret that are used to manage the destination PostgreSQL database.
Log on to the RAM console and obtain the AccessKey ID and AccessKey secret.
Instance ID and Region: the ID and region of the PostgreSQL database.
SSL
If SSL is configured for the destination data source, you can select SSL to protect data security.
Initialize SQL statements
The SQL statement that is initialized and executed after each data source connection. Only SET statements are allowed. The statements are separated by semicolons.
Click Test Connection to verify that the data source can be connected.
Click OK.
What to do next
After you add a data source, you can create a dataset and analyze data.
For more information about how to add a table in the PostgreSQL database or a self-managed SQL Quick BI, see Create and manage datasets.
You can add charts for data analysis. For more information, see Create a dashboard and Overview of visualization charts.
Drill down the data for in-depth data analysis. For more information, see the Configure the drilling feature section of the "Drilling" topic.