Updated on 2024-06-21 GMT+08:00

Creating PostgreSQL Data Connections

Before establishing a data connection to PostgreSQL, ensure that the following condition is met:

  • You have obtained the address, port number, username, and password of PostgreSQL.
  • A Cloud Data Migration (CDM) cluster is used as the network agent to ensure that DLV can communicate with the PostgreSQL data source. The CDM cluster must meet the following requirements:
    • You need to create a CDM cluster on the CDM console. The CDM cluster and DLV must be in the same region. For details about how to create a CDM cluster, see Creating a CDM Cluster.
    • If the PostgreSQL data source is not on Huawei Cloud, the host where the PostgreSQL data source is located must have a public IP address, and the CDM cluster must be bound with an elastic IP address (EIP).
    • If the PostgreSQL data source is on Huawei Cloud, the host where the PostgreSQL data source is located must be in the same region, AZ, and VPC as the CDM cluster.
    • If the firewall is enabled on the host where the PostgreSQL data source is located, the inbound and outbound rules of the firewall must allow the access of the PostgreSQL database port and the CDM cluster address.
    • The inbound and outbound rules of the security group to which the CDM cluster belongs must allow the access of the IP address and port of the PostgreSQL database.

Creating a PostgreSQL Data Connection

  1. Log in to the DLV console.
  2. On the Data page, click the workspace drop-down list at the top of the page, select the workspace to be accessed, and click New Data Connection.

    Figure 1 Creating a data connection

  3. In the New Data Connection dialog box, set Data Source Type to PostgreSQL and set the related parameters.

    Figure 2 Creating a PostgreSQL data connection

    Table 1 describes the PostgreSQL data connection parameters.

    Table 1 PostgreSQL data connection parameters

    Parameter

    Description

    Name

    Name of the data connection. Must contain 1 to 32 characters and contain only letters, digits, hyphens (-), and underscores (_).

    Domain Name

    IP address of the database.

    Port

    Port of the database.

    Username

    Username of the database. The database user must have permission to access data tables and metadata.

    Password

    Password of the database user.

    Agent

    Select an available connection agent, such as VPC connection, CDM proxy, or Internet.

    NOTE:

    PostgreSQL is not a fully managed service and thus cannot be directly connected to fully managed DLV. A CDM cluster serves as an agent that enables communication between them.

    Database

    You can select a database from the Database drop-down list.

  4. Click OK.

Using PostgreSQL Data Sources

You can configure and use PostgreSQL data sources by referring to the instructions in Using DWS Data Sources.