cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
panterra
Advocate III
Advocate III

Cosmos DB Error While Querying Documents

HI Everyone,
 
I am using the Cosmos DB Connector's Query Documents action and am getting this error:
 
"code": "BadRequest",
"message": "Message: {\"Errors\":[\"The collection cannot be accessed with this SDK version as it was created with newer SDK version.\"
 
Here is a little more background: 
  • Connecting to a Core SQL Cosmos DB Instance
  • Throughput has been applied at the Database level instead of the Collection level - Not sure if this matters or not
  • Are attempting to query an Accounts collection within the database

 

Query Documents.PNG

 

Has anyone seen this error? Let me know if there are any other details I could provide that would be useful.

 

Thank you!

Sean

 

 
 
1 ACCEPTED SOLUTION

Accepted Solutions

Hi Everyone,

 

It turns out that this error is related to the following issue with the partition key setting.

 

Partition Key.png

 

This must be unchecked on your partition for the Cosmos DB Connector to work correctly.

 

Thanks,

Saen

View solution in original post

2 REPLIES 2
v-yamao-msft
Community Support
Community Support

Hi @panterra ,

 

I have searched online for relative error message. From this thread, it seems that upgrading the .nuget packages Microsoft.Azure.DocumentDB and Microsoft.DocumentDB.TransientFaultHanding to latest stable will fix the issue.

 

Please check it and try to update your SDK version to see if it will work:

https://github.com/Azure/azure-documentdb-datamigrationtool/issues/35

 

Further, there are some know issues and limitations when working with Azure Cosmos DB, please check it for more details:

https://docs.microsoft.com/en-us/connectors/documentdb/

 

By the way, please try to change your query code likes below without double quotes around the number to see if it will work:

Select*From Accounts c Where c.docid=1

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Everyone,

 

It turns out that this error is related to the following issue with the partition key setting.

 

Partition Key.png

 

This must be unchecked on your partition for the Cosmos DB Connector to work correctly.

 

Thanks,

Saen

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,352)