Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
rinogattuso
New Member

Error connecting Postgres with Gateway

I can connect Power BI Desktop to a local Postgres server, so I published a Power BI report and tried to set up a connection on Power BI Cloud with my local gateway that can access Postgres.

If I try to update the semantic model, I receive this error:

 

Errore dell'origine dati: [ValidateMarkupTags]{"error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","pbi.error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","parameters":{},"details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode","detail":{"type":1,"value":"-2147467259"}},{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"[ccon]Installare Npgsql versione 4.0.16.0</ip> o precedente.[/ccon]"}},{"code":"DM_ErrorDetailNameCode_UnderlyingHResult","detail":{"type":1,"value":"-2147467259"}},{"code":"Microsoft.Data.Mashup.ErrorCode","detail":{"type":1,"value":"10305"}},{"code":"Microsoft.Data.Mashup.ValueError.DataSourceKind","detail":{"type":1,"value":"PostgreSQL"}},{"code":"Microsoft.Data.Mashup.ValueError.DataSourcePath","detail":{"type":1,"value":"[ccon][ccon]<ip>192.168.0.12</ip>[/ccon]<ip><ip>192.168.0.0</ip></ip>;val_fKOANemvfL[/ccon]"}},{"code":"Microsoft.Data.Mashup.ValueError.Reason","detail":{"type":1,"value":"DataSource.MissingClientLibrary"}}],"exceptionCulprit":1}}} Table: prodotto.
URI cluster: WABI-WEST-EUROPE-redirect.analysis.windows.net
ID attività: 7a39cf9b-0094-4de7-be3f-2c8be3c19cdc
ID richiesta: 4d229eaa-5fba-68b3-b18c-ab4637ad8aa5
Ora: 2024-12-20 10:32:25Z

 

I've installed Npgsql version 4.0.16.0 as stated in the error log and restarted the gateway, but I still get the same error.

My gateway is okay because I use it to access Excel files that are on the local network in other Power BI reports.

Sorry if my English is not correct.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,@rinogattuso .Merry Christmas to you.
I subsequently configured the relevant pbix reports according to the official documentation and successfully completed the refresh operation on Service
I hope you find the following test helpful.

My
servername:
localhost:5432


I use the version :PostgreSQL 17

vjtianmsft_0-1735550644629.png

vjtianmsft_2-1735550681822.png

 

vjtianmsft_3-1735550766596.png

There was a problem at the beginning.

Requires version 4.0.10 or earlier (do not download newer versions)

Release Npgsql v4.0.10 · npgsql/npgsql · GitHub

vjtianmsft_4-1735550824513.png

Note that you must check the box for

vjtianmsft_5-1735550851898.png

After successful installation restart the computer (you have to restart the computer)

Log in to the power bi service and configure the on process gateway.

vjtianmsft_6-1735550887657.png

vjtianmsft_7-1735550893468.png

vjtianmsft_8-1735550916967.png

When the gateway is set up correctly, the data source credentials issue is automatically resolved as well
PostgreSQL Refresh Successful.

vjtianmsft_10-1735550964323.png

 

vjtianmsft_9-1735550943141.png


I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi,@rinogattuso .Merry Christmas to you.
I subsequently configured the relevant pbix reports according to the official documentation and successfully completed the refresh operation on Service
I hope you find the following test helpful.

My
servername:
localhost:5432


I use the version :PostgreSQL 17

vjtianmsft_0-1735550644629.png

vjtianmsft_2-1735550681822.png

 

vjtianmsft_3-1735550766596.png

There was a problem at the beginning.

Requires version 4.0.10 or earlier (do not download newer versions)

Release Npgsql v4.0.10 · npgsql/npgsql · GitHub

vjtianmsft_4-1735550824513.png

Note that you must check the box for

vjtianmsft_5-1735550851898.png

After successful installation restart the computer (you have to restart the computer)

Log in to the power bi service and configure the on process gateway.

vjtianmsft_6-1735550887657.png

vjtianmsft_7-1735550893468.png

vjtianmsft_8-1735550916967.png

When the gateway is set up correctly, the data source credentials issue is automatically resolved as well
PostgreSQL Refresh Successful.

vjtianmsft_10-1735550964323.png

 

vjtianmsft_9-1735550943141.png


I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



Anonymous
Not applicable

Hi,lbendlin,thanks for your concern about this issue.

Your answer is excellent!
And I would like to share some additional solutions below.

Hello,@rinogattuso .I am gald to help you.
I found the relevant issue link from my browser, hope it helps.
URL:

Power Query PostgreSQL connector - Power Query | Microsoft Learn

vjtianmsft_0-1734934881947.png

And I've noticed that some users try to use the ODBC connector instead of the PostgreSQL connector, but be aware that you'll need to reconfigure the data source and may need to modify the query.
URL:
Solved: Configure Gateway to connect to PostgreSQL - Microsoft Fabric Community
Solved: PostgreSQL connection through On-premise Data Gate... - Page 2 - Microsoft Fabric Community

If you need to use a gateway to connect to PostgreSQL, using ODBC is also a good idea.
Using ODBC is also a suggestion to try.
URL:
PowerBI and PostgreSQL : SSL, Let’s encrypt and Gateway


I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian

lbendlin
Super User
Super User

Gateway install files do not include the Postgres drivers. You can borrow them from the Desktop install. 

 

From C:\Program Files\Microsoft Power BI Desktop\bin\ADO.NET Providers

to C:\Program Files\On-premises data gateway\m\ADO.NET Providers

 

everything npgsql

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.