Add a PolarDB for PostgreSQL data source to connect to the Alibaba Cloud PolarDB for PostgreSQL database and 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 Alibaba Cloud PolarDB for PostgreSQL over the Internet or a VPC. This topic describes how to add an Alibaba Cloud PolarDB for PostgreSQL data source.
Prerequisites
An Apsara PolarDB for PostgreSQL cluster is created. For more information, see Create a cluster.
Background information
If you use a PolarDB database (PolarDB for PostgreSQL) that runs PostgreSQL, you can add a cloud data source PolarDB for PostgreSQL when you connect the database to the Quick BI for data analysis. For more information about PolarDB for PostgreSQL, see What is PolarDB?
To prevent data access failures caused by the whitelist of the data source, you must add the CIDR blocks 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.
Only Advanced Edition and Quick BI Enterprise Standard allow you to add PolarDB for PostgreSQL data sources in group workspaces.
Procedure
After you log on to the Quick BI console.
Go to the Create Data Source page.
Click Show More.
Select the Alibaba PolarDB for PostgreSQL data source.
In the Add PolarDB for PostgreSQL Data Source dialog box, configure the parameters based on your business requirements.
Item
Description
Display 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 public port of the PolarDB for PostgreSQL database cluster. If you use a VPC data source, you must enter the internal endpoint and port of the database. Log on to the PolarDB console. In the Basic Information section, click Apply on the right side of Public Network to obtain the database endpoint. Example: xxxxxxxxxxxxxxxxx.pg.polardb.rds.aliyuncs.com.
For more information, see View or apply for an endpoint.
Database
The name of the database that is customized when the PolarDB for PostgreSQL DB cluster is deployed.
Log on to the PolarDB console. On the Databases page, obtain the name of the database.
Schema
PolarDB for PostgreSQL the schema name of the database cluster.
Username and Password
The username and password used to log on to the PolarDB for PostgreSQL DB cluster.
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 access the PolarDB for PostgreSQL database.
Log on to the RAM console and obtain the AccessKey ID and AccessKey secret.
Instance ID and Region :PolarDB for PostgreSQL the ID and region of the cluster.
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 and line breaks are not allowed.
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 data tables in the PolarDB for PostgreSQL database or self-managed SQL statements to the Quick BI, see Create and manage datasets.
You can add charts and analyze data. For more information, see Create a dashboard and Overview.
You can drill down and further analyze data. For more information, see Drilling, filter interaction, and hyperlink.