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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ppvinsights
Helper III
Helper III

Row Duplication when using postgreSQL connector

Hi forum,

I already posted this topic in another thread - but I think it is better to create a new one with the problem stripped down to the main problem, with (hopefully) can be replicted by someone in this forum:

 

I have a problem with the postgresql connector loading data from a table. I load the data in a base-query which is referenced by another query. And magically the rows are duplicated if loaded to power bi (is not visible in power query) - and I cannot find the problem or a solution. A transformation step "delete duplicates" is not a solution (before doing that I use a native sql query). My initial problem was way more complicated having a couple of joins - I was not able to figure out why I have duplications. Now I stripped down the problem to an easy transformation.

 

You can find my example files in my dropbox:

 

https://www.dropbox.com/scl/fi/klcq6rusf83pgu7wj6ku6/postgreSQL_RowDuplication.zip?rlkey=imu2dp8qxlc...

 

The file contains the following files:

1) createDatatype: This creates an enumeration datatype. I need to select this column to reporoduce the error.

2) the ddl of the table with the data

3) the insert statements (about 23.000 rows with just 3 Columns)

and for sure: the power bi file. You just have to change the database server and the database.

 

I found these obervations:

- If there is no index on the "id" column, the duplication does not happen

- The transformation "select columns" is necessary. Otherwise no duplication happens

- you need to select the enumeration column. Otherwise no duplication shappens.

- the sort is necessary. Otherwise no dulication happens

 

I think the reason is hidden behind

- query folding

- paging with using the index

- the enumeration

 

Thanks everybody for your support!

Holger

 

3 REPLIES 3
lbendlin
Super User
Super User

I assume you are aware that Power Query is case sensitive while Power BI is not?

@lbendlin : yes, sure I am. Were you be able to reproduce my problem?

Sorry, I won't have time to spin up a PostGreSQL test environment for this.  I hope someone else can help you further.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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