This topic describes how to add a user-created PostgreSQL data source.

Prerequisites

  • You can access data sources directly or indirectly from an external network.
  • A self-managed PostgreSQL database is created.
  • The username and password that you use to access the PostgreSQL database are obtained.
  • The AccessKey ID and AccessKey secret used for authentication are obtained.

Procedure

  1. Click the Workspace tab. In the left-side navigation pane, click Data Sources.
  2. On the Data Sources page, click Create Data Source in the upper-right corner.
  3. In the Add Data Source dialog box, click the User-created Data Sources tab and then the PostgreSQL card.
    添加数据源
  4. In the Add PostgreSQL Database dialog box, configure the parameters.
    Add a user-created PostgreSQL data source
    Parameter Description
    Name The name of the data source. In this example, set the value to user-created data source PostgreSQL.
    Database Address The IP address of the database that is used as the data source.
    Port Number The port that you use to access the database. Default value: 5432.
    Database The name of the database that you want to access. In this example, set the value to PostgreSQL.
    Schema The schema of the database. Default value: public.
    Username The username that you use to access the database. In this example, set the value to root.
    Password The password that you use to access the database.
    User-created ECS Data Source (VPC) Select this option based on your business requirements. If you select User-created ECS Data Source (VPC), configure the following parameters:
    • AccessKey ID: the AccessKey ID used to purchase the ECS instance.
    • AccessKey Secret: the AccessKey secret used to purchase the ECS instance.
    • Instance ID: the ID of the ECS instance.
    • ECS Instance Region: the region where the ECS instance resides. In this example, set this value to China (Qingdao).
    SSL Specify whether to use the SSL protocol for the data source based on your business requirements. If you select SSL, the MaxCompute Lightning service is supported. For more information, see Overview.
    ssh Specify whether to access the data source over an SSH tunnel based on your business requirements. If you select ssh, configure the following parameters:
    • SSH Host: the hostname or IP address of the SSH host.
    • SSH Username: the username that you use to access the SSH host.
    • SSH password: the password that you use to access the SSH host.
    • SSH Port Number: the port that you use to access the SSH host. Default value: 22.
    Note Only Quick BI Enterprise Standard allows you to access user-created data sources in group workspaces over SSH tunnels.
  5. Click Test Connection to test connectivity with the database.
    Test connectivity with the database
  6. After the database passes the connectivity test, click OK.