cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

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
Highlighted
Super User V
Super User V

Re: PowerBI local not uploading PostgreSQL datasource to PowerBI web

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.

Highlighted
Regular Visitor

Re: PowerBI local not uploading PostgreSQL datasource to PowerBI web

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? 

Highlighted
Community Support
Community Support

Re: PowerBI local not uploading PostgreSQL datasource to PowerBI web

Hi, @norbert_mohawk 

 

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.

Highlighted
Regular Visitor

Re: PowerBI local not uploading PostgreSQL datasource to PowerBI web

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

Highlighted
Regular Visitor

Re: PowerBI local not uploading PostgreSQL datasource to PowerBI web

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...

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Featured Data Story of The Month

Featured Data Story of The Month

All Data Stories Gallery contributions are reviewed for each month. We select a contribution and feature the community member the following month.

Power BI Dev Camp - Developing with .NET Core

Power BI Dev Camp - Developing with .NET Core

Learn how to develop custom web applications for Power BI using .NET Core 3.1 and .NET 5.

Power BI Desktop August 2020 Update

Power BI Desktop August 2020 Update

We have great updates this month! Click the link for the video with more info.

Top Solution Authors
Top Kudoed Authors