Forum Discussion

korayg's avatar
korayg
New Member
3 months ago
Solved

Configure Gateway to connect to PostgreSQL

Hello,

 

With powerbi desktop I can easily connect with postgres database But doing the same with PowerBI on premise gateway I could not connect when adding a data source on gateway setting(gateway cluster). Below screenshot for reference. The first picture is of PowerBI desktop and the second one is on gateway settings. I was able to connect on PowerBI desktop, Thanks in advance for the help.

 

 

 

 

 

 

 

6 Replies

  • Hi korayg,

    Since the PostgreSQL connection works in Power BI Desktop, the database server and credentials are likely correct. The problem may be related to the Gateway configuration. Please check the Gateway version, as older versions might need the Npgsql provider installed separately, and make sure the authentication settings are the same as in Power BI Desktop. Also, confirm if the Gateway is installed on the same machine as Power BI Desktop, since the Gateway must be able to access the PostgreSQL server and meet any network, firewall, or SSL requirements.
    Power Query PostgreSQL connector - Power Query | Microsoft Learn
    On-premises data gateway - Power BI | Microsoft Learn

    Thank you.

  • Hi korayg 

     

    Screenshot that you posted below is where. It is using a cloud connection. You have to configure this creating a gateway connection first and then map that service settings. 

    As shown below

    1. Make sure you select On-Premises

    2. Then select your Gateway

    3. Then select the PostGreSQL

     

  • Hi korayg,

     

    Can you conform your PostgreSQL is On-prem or on cloud? From the server name it seems it should be on-prem.

    If, yes you need to create the new gateway connection for same DB using On-Premises option instead cloud.
    Follow the same steps Enter server name, DB Name, Basic Auth, User name and password, Privacy level (if needed). Try this out this will create the new gateway connection if evrything is good.


    Please consider as an accpedted solution if helps, or give some kudos.

     

  • Hi korayg ,

     

    Power BI Desktop connects directly to PostgreSQL because it runs locally on your machine. In the Service, though, you’re trying to reach an on‑premises PostgreSQL database, which requires the On‑premises Data Gateway as a bridge. The gateway must be installed on a server that has network access to your PostgreSQL instance, and the 64‑bit Npgsql driver needs to be installed on that gateway machine. Once the driver is in place and the gateway is configured, you can add the PostgreSQL data source under Manage Connections & Gateways and the Service will connect successfully.  

     

    Thanks,

    Sai Teja 

  • HI korayg,

    Have you had a chance to review the solution we shared earlier? If the issue persists, feel free to reply so we can help further.

     

    Thank you.

  • Hi korayg,

    Checking in to see if your issue has been resolved. let us know if you still need any assistance.

     

    Thank you.