How to create a custom udaf in mongo db?

HI,

i want to create create a custom user defined aggregation function in mongo db how to do it??

Hi @anubhav_tarar,

Welcome to MongoDB community.

I think you are looking for $function or $accumulator:

https://docs.mongodb.com/manual/reference/operator/aggregation/function/

Those are available from 4.4 .

Otherwise there is a mapReduce command

Thanks
Pavel

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.