I am trying to connect PostgreSQL database to Power Bi. Database is hosted on Heroku. I am getting the following error -
An error happened while reading data from the provider:
'The remote certificate is invalid according to the validation procedure.
I think i am getting this error because it needs "sslmode=require". but I am not sure how to proceed.
Can someone help me with this problem.
Thanks in advance.
These steps should help you connect to Power BI desktop via ODBC. Note, you should probably create a follower database in heroku so you're not using your production database credentials.
Driver={PostgreSQL Unicode};Server=HEROKU_HOST
, where HEROKU_HOST is the "Host" from your heroku database credentials (example: ec2-xx-xxx-xx-xx.xxx.amazon.com
).HEROKU_XXXX
replaced with your info:
PORT=HEROKU_PORT;DATABASE=HEROKU_DATABASE;POOLING=True;MINPOOLSIZE=1;MAXPOOLSIZE=20;HOST=HEROKU_HOST;COMPATIBLE=2.2.3.0;USER ID=HEROKU_USER;PASSWORD=HEROKU_PASSWORD;SSLMODE=require
I don't use Heroku but had a similar problem with AWS and had to configure the db provider and certificates as described below. I would think that something similar is needed for Heroku.
I did some digging and found 2 possible solutions for Heroku:
sslmode=Require;Trust Server Certificate=true
in the database connection. This does not seem to be an option with PowerBI, because even under "Advanced Settings" there is nowhere to provide these.PowerBI and Excel support connections to Postgres using the Npgsql .NET Data Provider. This provider is not installed by default on Windows. Here's how to install it:
If you are connecting to a Postgres cluster running in AWS, when you attempt to connect to Postgres after installing the Npgsql provider you may get an error saying:
"The remote certificate is invalid according to the validation procedure"
Here's how to fix it:
You should now be able to connect to your AWS RDS Postgres database from PowerBI or Excel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With