Forum Discussion

bumoverflow's avatar
bumoverflow
Frequent Visitor
2 years ago

Cosmos DB Connector returns different results than in container

When using Data Explorer I'm receiving bigger result than using Cosmo DB V1 connector in Power BI. Result version in pbi lacks a lot of columns that are visible in the Data Explorer. Is it a matter of settings? I'm importing only one container just to compare two results so it is not because of too big result. Microsoft decided to disable documentation for V1 so I cannot read what may be the problem...

I'm not going to mention about Cosmos DB V2 connector, which just loads for eternity and doesnt really returns anything...

3 Replies

  • The V1 connector in Power BI might not be projecting all columns by default. Power BI's Cosmos DB connector often works with predefined schemas or may not dynamically infer the schema like the Data Explorer does.

    Also, it is using an older API version or different serialization settings, leading to discrepancies in the data being fetched. (since it is deprecated)

    Given that the V2 connector isn't working as expected, you may need to contact Microsoft support.

    I found this old thread : https://stackoverflow.com/questions/53090283/cosmos-db-query-doesnt-return-all-results

     

    • bumoverflow's avatar
      bumoverflow
      Frequent Visitor

      AmiraBedh  Thank you for your response. Is it possible to edit the schema to receive a different result, similar to how it’s done in the explorer?

      • AmiraBedh's avatar
        AmiraBedh
        Icon for Super User rankSuper User

        When you connect to Cosmos DB, instead of loading the data directly, you can write a custom SQL query that explicitly selects the columns you want. 

        Or after loading the data , you can use  PQ  to manually adjust the schema.