Power BI is a uniform, extendable self-service and enterprise business intelligence ( BI) platform. You can use Power BI to connect to data sources for data modeling, visualized analysis, and personalized reporting. This topic describes how to use Power BI to connect to AnalyticDB for PostgreSQL.
A Power BI client is downloaded and installed. For more information, see Microsoft Power BI.
A public endpoint is obtained for the AnalyticDB for PostgreSQL instance. For more information, see Manage public endpoints.
The IP address of the device where the Power BI client is installed is added to an IP address whitelist of the AnalyticDB for PostgreSQL instance. For more information, see Configure an IP address whitelist.
A table is created in the AnalyticDB for PostgreSQL instance, and data is inserted into the table. In this example, the customer table is used.
Start the Power BI client.
In the top navigation bar, click Home. Choose.
In the Get Data dialog box, chooseand click Connect.
In the PostgreSQL database dialog box, specify the database connection information and click OK.Note
If the connection fails, check whether the connection information that you specified is correct and whether the IP address of the device where the Power BI client is installed has been added to an IP address whitelist of the AnalyticDB for PostgreSQL instance. Then, try again.
The public endpoint and port number that are used to connect to the AnalyticDB for PostgreSQL instance.
The name of the AnalyticDB for PostgreSQL database.
Data Connection mode
Import: copies data to Power BI.
DirectQuery: dynamically requests data from the connected data source.
DirectQuery is more suitable in the following situations:
The data source contains a large amount of data.
Quasi-real-time data is required.
In the dialog box that appears, specify your username and password credentials and click Connect.
The database account that is used to connect to the AnalyticDB for PostgreSQL instance.
The password of the database account.Important
If the Encryption Support message appears, click OK.
In the Navigator dialog box, select the customer table that you want to import and click Load.
In the Visualizations pane of the Report View tab, select a chart type. In this example, Clustered Column Chart is used.
In the Fields pane, select the columns that are contained in the customer table. In this example, age and login_time are used.
Click the icon in the upper-left corner to save the report.
(Optional) On the Home page, click Publish in the upper-right corner.Note
If necessary, sign in to the Power BI service.