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:
Mongoclient(uri)[db_name][collection_name]
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?