Overview of User Defined Functions

Learn how user-defined functions (UDFs) unlock more query possibilities in Cosmos DB.

Introduction

We might find that system functions are not enough in complex queries for our needs. Cosmos DB lets us define custom functions stored on the server side.

We can write them in JavaScript, and they work as expected. They take some inputs and return a value. For example, we can define a function that, given an input string, returns if it’s a palindrome.

Get hands-on with 1400+ tech skills courses.