简体   繁体   中英

Conditional Cosmos DB Change Feed

I am "connecting" CosmosDB to an Azure Function by change feed binding. I wonder if there is a way to trigger change feed only when certain property has some specific value.

For instance, a new user is inserted in CosmosDB. Then, run the Azure Function only when the user has user.email.= null.

I could filter this out in the Azure Function of course. Just concern about the pricing filtering out potentially thousands of events I don't need.

No this is not currently possible.

There is a 5 year old request on the Feedback site and a response saying the "feature is now planned" but it is unclear when that response was posted as there is no date on it.

For the time being at least you need to filter out any documents not matching your criteria within the function itself rather than being able to get this done server side by CosmosDB when sending the batch of changes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM