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

Azure Cosmos DB V2 Connector for Power BI - Missing Query option - Reg

Hi,

 

  I am trying to connect to cosmos db transactional store from power BI using V2 (Beta). Though it supports Direct query option, i could not find an option to pass a query like "select * from c where c.id=xxxx". 

without the query option it is initially fetching upto 1000 records which is causing very slow.. Even if i apply a filter using parameter, it is filtering only after fetching the initial 1000+ records. 
Can some one help with 

    a) How to pass a query to the connector in V2

    b) Is there a detailed documentation available for V2 connector ?
 Mquery in V1: 

    let
       Source = DocumentDB.Contents("https://xxxxxxxx-cosmosdb.documents.azure.com:443/", "xxxxxDB", "xx_container", [Query = "select * from c where c.id=""xxxxx"""]),

 

 Mquery in V2:

    Source = CosmosDB.Contents("https://xxxxxxxxx-cosmosdb.documents.azure.com:443/", [NUMBER_OF_RETRIES="1", ENABLE_AVERAGE_FUNCTION_PASSDOWN=null, ENABLE_SORT_PASSDOWN_FOR_MULTIPLE_COLUMNS=null]),
a_Database = Source{[Name="xxxxx",Kind="Database"]}[Data],
#"a_Schema" = a_Database{[Name="xxxxx",Kind="Schema"]}[Data],
#"a_Table" = #"a_Schema"{[Name="xxxxx",Kind="Table"]}[Data]

 

Thanks,

Nsr

1 ACCEPTED SOLUTION

Hi @Nsr_1975 ,

Please refer this document:  CosmosDB.Contents - Function | Power Query How

Hope it is helpful for you.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-binbinyu-msft
Community Support
Community Support

Hi @Nsr_1975 ,

For more information about Azure Cosmos DB V2Connector, please refer this document:  Power Query Azure Cosmos DB v2 (Beta) - Power Query | Microsoft Learn

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi v-binbinyu,

 

Thanks for the reply. I am actually looking for the detailed options available with cosmosdb.contents()  the detailed documentation for the connector.

Thanks,

Nsr

Hi @Nsr_1975 ,

Please refer this document:  CosmosDB.Contents - Function | Power Query How

Hope it is helpful for you.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors