4
votes

Can we we trigger an azure function only when certain document with field values inserted into Cosmos DB ? E.G an employee document with country "USA" field value trigger azure function. I couldn't figure this one out as its always triggering the function whenever there is an item added / modified which makes too much function calls.

Thanks !

Regards, Sowmyan

2
You may have to implement your own binding/trigger ?Thomas

2 Answers

0
votes

the trigger doesn't seem to have any way to filter based on field value, but you can always partition your data into different collections if that makes sense for your case

1
votes

Well based on the suggestion from one of the cosmosdb expert from microsoft

"Right now we don't support filters on the Change Feed but it is in the roadmap :) You can apply a filter within the Function's code as a workaround right now on the batch of received documents."

You can do the above rather than partitioning which is going to cost you much.