We need an endpoint to return unique values in the database
This is useful for database checks and sanitation. See in the example image below, running the aggregation tells us that city naming capitalization is not standardized.
This is also useful for sampling unique values in the database for client-facing purposes.
For example, a client needs to list all available locations with events or all available categories of events.
They should be able to obtain the category options from the database.
Aggregation to find all unique values for a given field
We need an endpoint to return unique values in the database
This is useful for database checks and sanitation. See in the example image below, running the aggregation tells us that city naming capitalization is not standardized.
This is also useful for sampling unique values in the database for client-facing purposes.
For example, a client needs to list all available locations with events or all available categories of events. They should be able to obtain the category options from the database.
Aggregation to find all unique values for a given field
Categories
Cities