From the course: Microsoft Azure Cosmos DB Developer Specialty (DP-420) Cert Prep by Microsoft Press

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Implement queries that use array and type-checking functions

Implement queries that use array and type-checking functions

Type-checking functions would be does a particular property exist? So you'll find if you look again in the Cosmos DB documentation, there's a number of IS functions, and IS_DEFINED as a true false evaluation. And in this case, is there data stored for tags? True or false? Is the tags property an array? For example, would allow you to differentiate the data type for that value. Is the tags property null? So there's a number of these including IS_NUMBER, pun intended, IS_STRING, IS_BOOLEAN. And this can be useful when you're doing more complicated SQL queries, in particular when you're doing stored procedures where you need to verify type before you proceed further with your logic.

Contents