Forum Discussion
Connect PowerBI Desktop with PostgreSQL
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
Having the same issues, thanks for the info so far.
From what I can tell after version 3.x of Npgsql the behaviour changed from:
warn about non-encrypted connections and allow connection anyways after prompt
to:
require encrypted connection
and no one knows how to change connection params in Excel.
Excel 2010 works when using https://github.com/npgsql/npgsql/releases/tag/v2.2.5 (rc3 https://github.com/npgsql/npgsql/releases/download/v2.2.5/Setup_Npgsql-2.2.5.0-r3-net45.exe) and installing only the 1st, 3rd, and fourth check boxes.
Doing the above does not require any messing about with GACUtil and machine.config.
Power Query will then warn about the connection to postgresql not being encrypted but allow you to connect anyways.
Can't get any of this to work in Excel 2016 though...