Your ASA query must include all parts of the hierarchical partition keys. In Cosmos DB, if you have hierarchical partition keys (for exq;ple ["/organizationId", "/jobId"]
)
Depending on the specifics of your setup, using the Cosmos DB v2 connector in Azure Stream Analytics is better for complex partitioning schemes. The v2 connector has improved capabilities around partitioning and might handle hierarchical partition keys more gracefully.
Qs q reco;;endqtion, If your update logic is complex consider using Cosmos DB stored procedures to handle updates and you can trigger them from Azure Functions or another component in your architecture that receives output from the Stream Analytics job.