Referencing a collection in cosmos

Migrating an app to Cosmos DB and running into issues. I’m using pymongo but I don’t think that’s terribly relevant.

Where before, I used something like:

But cosmos is unhappy with that. It throws the error : “document does not contain a shard key”. It’s worth noting that I can change collection_name to a shard key name and the error changes to: Resource Type Collection is unexpected.

How to reference a collection in cosmos?

Hello @Josh_Restivo welcome to the MongoDB community,

in case you think that your issue has MongoDB related roots, can you please elaborate on this? In that case it would be ideal when you could show what steps you have made until you get the error.
For CosmosDB related questions you may want to check the comosdb community support or Azure Professional Support