can't connect Azure PostgreSQL Datebase to ODBC

maxianren 21 Reputation points
2021-12-17T09:37:16.27+00:00

I created a Azure PostgreSQL Datebase and it is possible to be connected with local computer using python and azure studio. however, i have problem connecting PowerBI

158524-image.png

158487-image.png

i was told to connect to ODBC first and install Gateway following the instruction

https://dataintoresults.com/post/powerbi-and-postgresql-ssl-lets-encrypt-and-gateway/

https://help.interfaceware.com/v6/connect-to-postgresql-from-windows-with-odbc

first but not managed to establish the connection as shown in the screen shot, what could the problem be? is there any one can help? thank you

158574-image.png

Azure Database for PostgreSQL
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Saurabh Sharma 23,866 Reputation points Microsoft Employee Moderator
    2021-12-21T00:13:58.833+00:00

    Hi @maxianren ,

    Thanks for using Microsoft Q&A !!
    I do not see any issue connecting to a PostGreSQL Server from PowerBI. Also, if your PowerBI version is earlier than December 2019 then you must install NpgSQL provider on your local machine for connecting to a PostgreSQL Server. However, after December 2019, NpgSQL 4.0.10 shipped with Power BI Desktop and no additional installation is required.

    Please refer to the postgresql documentation for details.

    Also, if you are trying to use ODBC then instead of selecting PostGreSQL from PowerBI you need to select ODBC from the connection and provide the necessary server details to connect to specific postgre instance. (See steps below)
    159143-image.png
    Select None and add server details like Driver={PostgreSQL ANSI(x64)};Server=<Server Name>.postgres.database.azure.com;Port=5432;Database=testdb; and provide username/password to connect to specific database and retrieve data.
    159106-image.png

    Please let me know if you have any other questions.

    Thanks
    Saurabh


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.