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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
akasthan
Employee
Employee

DataFormat.Error: Duplicate name

Hello,

I am trying to connect PowerBI desktop to Azure Cosmos DB. When I am opening the interested dataset, it is unable to load and generate error "DataFormat.Error: Duplicate name 'privacyEntityType'"

akasthan_0-1634928741514.png

I checked the entries in this collection in Cosmos DB and couldnt find any duplicates in any of the document. There is only one field with name "privacyEntityType".

akasthan_1-1634929544316.png


Can someone tell what is the real problem here? Does it mean that among N number of documents there could be one which has 2 "privacyEntityType"? It is highly unlikely.

Is there a way to bypass this or there is some issue on cosmos DB side?

3 REPLIES 3
akasthan
Employee
Employee

Hi @v-rzhou-msft 

Thanks for looking into this. I have already gone through above links to solve the problem but couldnt figure it out yet.

As far as the duplicate name is concerned, I manually checked all the items of a cosmos db container for which I was getting the error and none of the item contained duplicate name. 
In fact tried creating a record with duplicate key and cosmosdb does not allow it. It dedupes as soon as well save it.
Can it be occuring because of any other issue?

v-rzhou-msft
Community Support
Community Support

Hi @akasthan 

I think get data from ItemInsightsV2 will show you many Records. There may be duplicate names 'privacyEntityType' in same record. So this will cause error. I sugget you to check column names in your data source and rename duplicate names. 

Here is the offical blog about how to get data from Azure Cosmos DB.

For reference: Visualize Azure Cosmos DB data by using the Power BI connector

And you may refer to this post with similar problem like yours.

For reference: JSON Record with Duplicate Column Names: DataFormat.Error: Duplicate name 'value'.

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @RicoZhou 

Thanks for looking into this. I have already gone through above links to solve the problem but couldnt figure it out yet.

As far as the duplicate name is concerned, I manually checked all the items of a cosmos db container for which I was getting the error and none of the item contained duplicate name. 
In fact tried creating a record with duplicate key and cosmosdb does not allow it. It dedupes as soon as well save it.
Can it be occuring because of any other issue?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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