All Products
Search
Document Center

AnalyticDB:Use Power BI to connect to AnalyticDB for PostgreSQL

Last Updated:Mar 28, 2026

Power BI connects to AnalyticDB for PostgreSQL through the built-in PostgreSQL database connector, letting you load data, build visualizations, and publish reports.

Prerequisites

Before you begin, ensure that you have:

Connect Power BI to AnalyticDB for PostgreSQL

  1. Open the Power BI client.

  2. In the top navigation bar, click Home. Choose Get data > More.

  3. In the Get Data dialog box, choose Database > PostgreSQL database, then click Connect.

  4. In the PostgreSQL database dialog box, enter the connection details and click OK.

    ParameterDescription
    ServerThe public endpoint and port number of the instance. Example: gp-bp152460513z****o-master.gpdb.rds.aliyuncs.com:5432
    DatabaseThe name of the AnalyticDB for PostgreSQL database
    Data Connection modeHow Power BI retrieves data. See Choose a data connection mode
  5. In the credentials dialog box, enter the database account username and password, then click Connect.

    Important

    If the Encryption Support dialog box appears, click OK.

    ParameterDescription
    User nameThe database account used to connect to the instance
    PasswordThe password of the database account
  6. In the Navigator dialog box, select the customer table and click Load.

  7. In the Visualizations pane of the Report View tab, select a chart type. This example uses Clustered Column Chart.

  8. In the Fields pane, select the columns to display. This example uses age and login_time.

  9. Click the 保存.png icon in the upper-left corner to save the report.

  10. (Optional) Click Publish in the upper-right corner of the Home page to publish the report to the Power BI service.

    Note

    Sign in to the Power BI service if prompted.

Choose a data connection mode

Power BI offers two modes for connecting to AnalyticDB for PostgreSQL:

ModeHow it worksWhen to use
ImportCopies data into Power BIThe data source contains a smaller amount of data
DirectQueryQueries the database in real timeLarge datasets; near-real-time data requirements

Troubleshooting

Connection fails at step 4

Check the following:

  • The Server field contains the correct public endpoint and port in the format <endpoint>:<port>

  • The IP address of the device where the Power BI client is installed is in the instance's IP address whitelist

After confirming both, retry the connection.

What's next