Power BI: Error Occurred Reading Data Provider - Remote Certificate Not Valid According to Validation Procedure with PostgreSQL
Power BI is a powerful business analytics tool that allows users to visualize and analyze data from various sources. One of the data sources that Power BI supports is PostgreSQL. However, sometimes users may encounter an error when trying to connect to a PostgreSQL database server. This article will discuss the error message "Error Occurred Reading Data Provider - Remote Certificate Not Valid According to Validation Procedure" and how to resolve it when connecting to a PostgreSQL database server.
Understanding the Error Message
The error message "Error Occurred Reading Data Provider - Remote Certificate Not Valid According to Validation Procedure" is typically encountered when Power BI is unable to establish a secure connection with the PostgreSQL database server. This error message is related to the SSL certificate validation process, which is used to ensure that the connection is secure and that the data being transmitted is encrypted.
When Power BI tries to connect to a PostgreSQL database server, it checks the SSL certificate presented by the server. If the certificate is not valid or if it cannot be verified, Power BI will display the error message "Error Occurred Reading Data Provider - Remote Certificate Not Valid According to Validation Procedure".
Resolving the Error Message
To resolve the error message "Error Occurred Reading Data Provider - Remote Certificate Not Valid According to Validation Procedure" when connecting to a PostgreSQL database server, you can try the following steps:
Check the SSL certificate presented by the PostgreSQL database server. Make sure that the certificate is valid and that it has not expired.
If the SSL certificate is valid, but Power BI is still unable to verify it, you may need to import the certificate into Power BI. To do this, you can follow these steps:
Open Power BI and go to the "File" menu.
Click on "Options and settings" and then "Options".
In the "Options" window, click on "Security" and then "Trusted CAs".
Click on "Import" and then browse to the location of the SSL certificate. Select the certificate and click "Open".
Click "OK" to import the certificate into Power BI.
If the SSL certificate is not valid or if you are unable to import it into Power BI, you can try disabling SSL certificate validation. To do this, you can follow these steps:
Open Power BI and go to the "Home" tab.
Click on "Get Data" and then "PostgreSQL database".
Enter the server name, database name, and other required information, and then click "OK".
In the "Navigator" window, click on "Advanced options".
Under "SSL mode", select "Require".
Under "Trust server certificate", select "Yes".
Click "OK" to establish the connection.
The error message "Error Occurred Reading Data Provider - Remote Certificate Not Valid According to Validation Procedure" can be caused by an invalid or unverified SSL certificate when connecting to a PostgreSQL database server. To resolve this error message, you can check the SSL certificate, import it into Power BI, or disable SSL certificate validation. By following these steps, you can establish a secure connection with the PostgreSQL database server and visualize and analyze your data in Power BI.
References
// Example Power BI M code with SSL certificate validation disabled
let
Source = PqSql.Database("server", "database", [Query="SELECT \* FROM table"])
in
Source