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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

PowerBI local not uploading PostgreSQL datasource to PowerBI web

Hey,

so I have this simple dataset with 3 datasources. 

1) .csv file 

2) .csv file 

3) postgresql connection used by native queries

 

Locally everything works fine. On powerbi web I have gateway configured which has those 2 csv files and which is allowed to connect to the postgresql database. 

 

When I publish dataset to the web and try to refresh I get this error:

 

{"error":{"code":"ModelRefresh_ShortMessage_ProcessingError","pbi.error":{"code":"ModelRefresh_ShortMessage_ProcessingError","parameters":{},"details":[{"code":"Message","detail":{"type":1,"value":"Credentials are required to connect to the PostgreSQL source. (Source at xxxxxxxxxxxx)"}}],"exceptionCulprit":1}}}

 

It looks that powerbi is not uploading the datasource with the dataset when publishing to web version. Whene I go to Gateway 

settings section of this dataset I even don't see the postgresql datasource here so I can't map it to the gateway connection however those 2 csv files are available. 

I recently upgraded powerbi to the lastest version, previously everything worked fine. 

I already tried to clear permissions locally for the postgresql datasource, provide credentials once again and reupload dataset, it didn't work. 

Any idea how I can solve this? 

 

 

5 REPLIES 5
v-alq-msft
Community Support
Community Support

Hi, @Anonymous 

 

It is suggested to use NpgSQL 4.0.10 when you use postsql data source. NpgSQL 4.1 and up will not work due to .Net version incompatibilities.

 

As of the the December 2019 release, NpgSQL 4.0.10 shipped with Power BI Desktop and no additional installation is required. GAC Installation overrides the version provided with Power BI Desktop, which will be the default. Refreshing is supported both through the cloud in the Power BI Service as well as on premise through the Gateway. In the Power BI service, NpgSQL 4.0.10 will be used, while on premise refresh will use the local installation of NpgSQL, if available, and otherwise use NpgSQL 4.0.10.

 

For Power BI Desktop versions released before December 2019, you must install the NpgSQL provider on your local machine. To install the NpgSQL provider, go to the releases page and download the relevant release. The provider architecture (32-bit or 64-bit) needs to match the architecture of the product where you intent to use the connector. When installing, make sure that you select NpgSQL GAC Installation to ensure NpgSQL itself is added to your machine.

 

For further information, please refer to the document .

 

Best Regards

Allan

 

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 @v-alq-msft 

I double checked and NpgSQL version available on my local machine and on the server where I keep on-premises data gateway is 4.0.10 but to be sure I uninstalled it and installed again making sure that GAC is installed. 

 

Then I refreshed the dataset, it still worked just fine, then I removed the dataset previously uploaded to the cloud and I published it once again. 

 

This is what I see in the cloud when trying to set gateway connection

 

cloud datasourcescloud datasources

This is what I see locally

 

local datasourceslocal datasources

Anonymous
Not applicable

I think I know what's generating this issue however I don't know yet how to resolve it.

In the database I have 2 large tables which holds milions of records, to increase the refresh time I'm using for them incremental refresh. 

When I disable the incremental refresh feature for those 2 tables everything works fine. 

This is how parameters are defined for those native queries:

 

let
    source = PostgreSQL.Database("xxx.postgres.database.azure.com", "xxx"),
    results = Value.NativeQuery(
        source,
        "
        SELECT
            o.x,
            o.x1,
        FROM xxxx o
        WHERE
            o.xxx BETWEEN '" & Text.From(RangeStart) &"' AND '" & Text.From(RangeEnd) & "'
        ",
        [QueryFolding=true]    
    )
in
    results

 

It worked perfectly fine before I upgraded to the lastest version of powerbi...

lbendlin
Super User
Super User

Is the PostgreSQL data source on premise?  If yes then you need to add that connection to the gateway (use EXACTLY the same method as on the desktop)  and then the gateway will become available in your dataset.

Anonymous
Not applicable

Yeah but the problem is that gateway is configured, I checked also different dataset that is using the same database. It works just fine. Is it possible that this specific dataset got corrupted somehow and it's not uploading all datasources to the web version? 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors