Self-managed PostgreSQL data source

更新时间:
复制 MD 格式

This topic describes how to create a self-managed PostgreSQL data source.

Prerequisites

  • Ensure network connectivity:

    • If you connect Quick BI to your PostgreSQL database over the public network, add Quick BI's IP addresses to your database whitelist. For more information, see Use security groups.

    • If you connect Quick BI to your PostgreSQL database over an internal network, use one of the following methods to establish network connectivity between your data source and Quick BI:

      • If your PostgreSQL database runs on an Alibaba Cloud ECS instance, connect using Alibaba Cloud VPC.

      • Set up a jump server and access the database through an SSH tunnel.

  • You have a self-managed PostgreSQL database.

  • You have the username and password for your self-managed PostgreSQL database.

  • You have obtained the AccessKey ID and AccessKey secret for authentication.

Limits

PostgreSQL version 8.2 or later is supported.

Procedure

  1. Log on to the Quick BI console or the .

  2. Add a data source as shown in the following figure:

    1. Go to the data source creation page from the Create data source entry point.

    2. On the Self-managed database tab, select PostgreSQL as the data source type.image

  3. In the Configure connection dialog box, complete the following settings.image

    Name

    Description

    Display name

    The display name for the data source in the data source list.

    Enter a valid name without special characters. Do not include leading or trailing spaces.

    Database address

    The IP address or domain name where your PostgreSQL database is deployed.

    Port

    The port number of the database.

    Database

    The name of the database to connect to.

    Schema

    The name of the schema to connect to. The default value is public.

    Username

    The username for the database.

    Password

    The password for the database.

    VPC data source

    Select whether your data source resides in a VPC based on your business scenario. If you select VPC data source, configure the following parameters:

    • Purchaser AccessKey ID: The AccessKey ID of the account that purchased the instance.

      For more information, see Create an AccessKey.

      Note

      Make sure this AccessKey ID has read permissions on the destination instance. If it also has write permissions, the system automatically adds the required IP addresses to the whitelist. Otherwise, you must add them manually. For more information, see Create a custom policy.

    • Purchaser AccessKey secret: The AccessKey secret of the account that purchased the instance.

      For more information, see Create an AccessKey.

    • Instance ID: The instance ID of the ECS instance. Log on to the ECS console and find the instance ID on the Instances tab.

      For more information, see View instance information.

    • Region: The region where the ECS instance resides. In this example, the region is China (Qingdao).

      For more information, see View instance information.

    SSL

    Select whether to enable SSL based on your business scenario. If you select SSL, MaxCompute Lightning interactive search is supported. For more information, see Overview.

    SSH

    Select whether to use SSH to connect to your data source based on your business scenario. If you select SSH, configure the following parameters:

    • SSH Host: The hostname or IP address.

    • SSH username: The SSH username for the database.

    • SSH password: The password for the SSH username.

    • SSH port: The port for the database. The default value is 22.

    Note

    SSH tunnel access to self-managed data sources is supported only in Professional Edition workspaces.

    Initialization SQL

    The SQL statement executed after each connection to initialize the data source. Only SET statements are allowed. Separate multiple statements with semicolons.

    Enable file upload

    After enabling this option, file upload is supported.

  4. Click Test connection to verify connectivity to the data source.

    image

  5. After the test succeeds, click OK to complete adding the data source.

What to do next

After creating a data source, you can create datasets and analyze data.