Closed meer-khan closed 3 months ago
I have been able to reproduce your use case and the reason the trigger is not working is because Azure CosmosDB triggers do not yet support the MongoDB API. Refer to issue: https://github.com/Azure/azure-webjobs-sdk-extensions/issues/816
Hi @owboateng, Thankyou for your response, yes you are right, I investigated this problem for long time and your answer cleared all my concerns and confusions. I believe azure should not name the trigger as CosmosDB Trigger, it should be Azure CosmosDB for NoSQL trigger, because cosmosDB has alot of databases and triggers does not work with all of them. Now I am closing this issue on your accurate response. Thanks again.
Hello Azure community,
I've spent an entire day grappling with the configuration of Azure Functions triggered by Cosmos DB for MongoDB. While attempting to set it up locally using both the CLI and VSCode, I encountered various challenges. I want to highlight that the Azure documentation lacks specificity, particularly when it comes to configuring functions for Cosmos DB triggers (specifically for changes in Cosmos DB). The majority of the official documentation primarily focuses on HTTPTriggers.
I would greatly appreciate it if someone could provide a comprehensive, step-by-step guide—from creating an Azure Function app to triggering it through Cosmos DB. I am specifically looking for detailed instructions using VSCode or the CLI, covering both local testing and the deployment of the function for PYTHON v2 only.
NOTE: I am using free tier account of Azure I have a storage service on it I have Azure function app I have cosmosDB for Mongodb
Even on youtube tutorials, people only discussed HTTPTrigger for Python v2, and very few people discussed cosmosdb trigger for v2
Currently, I am facing the following issue while running the local function through
func start
, and I would be grateful for any assistance in resolving it and providing me a concrete step-by-step guide to creating an azure function triggered through cosmos DB.function_app.py
host.json
local.settings.json
.vscode/extensions.json