Forum Discussion
Connect PowerBI Desktop with PostgreSQL
Hi,
I have faced exaclty the same problem and I tried to set up Postgres as the documentation explains, but I get still the same message, any hints?
Thanks!
Im also having the same problem. hopefull
- ashishrj10 years ago
Power Participant
mfairchild This blog in Power BI Community might help click here
- mfairchild10 years agoNew Member
Thanks for that link ashishrj. I was actually trying to connect excel to postgres, and from there export to Power BI.
The doc at https://support.office.com/en-za/article/Connect-to-a-PostgreSQL-database-Power-Query-bf941e52-066f-4911-a41f-2493c39e69e4?ui=en-US&rs=en-ZA&ad=ZA seems straight forward, except its not clear how to specify additional options for the Npgsql driver. Plenty are mentioed at http://www.npgsql.org/doc/connection-string-parameters.html. I need to set the `Trust Server Certificate=true` value. The dialog in excel does not seem to offer fields for raw connection string tho. Any ideas how to specify more details, or jsut provide a raw connection string?
- jason_rmh10 years agoNew Member
I have had the same issue, connecting to a local instance of PostgreSQL.
I think thePostgreSQL instance will need to be configured for SSL using OpenSSL, although Im not yet sure how to do that.
As a work around, I am using an ODBC connection.
Install latest npgsql ( I installed v3.0.5).
Make sure you check the options to install to GAC when installing npgsql.
This will place the relevant assemblies in the windows assembly cache.
I then created a DSN connection to my postgres database (Control Panel > Admin Tools > Data Sources (ODBC)).
Remember, if on 64 bit machine you will need to use the ODBC tool from '%SystemRoot%\SysWOW64\odbcad32.exe' rather than the one from admin tools, other wise your DSN will not show in the application later on.
From Power BI, select 'ODBC' from the list when connecting to your data, you should then be able to select your DSN from the drop down that appears in Power BI.
Click OK, you will be prompted to enter username / password for the database connection.
Power BI will then scan the database and list the tables available for you to use.
Maybe not ideal using ODBC, but will get you going for now.
Hope this helps.
Jason