GihanDB
GihanDB

Reputation: 631

Perform Group By Operation with multiple attributes on Azure Aggregates API

Our problem is, How to perform group by operation with multiple attributes? As a example, lets assume we have a bellow event schema:

{
    {
        "name": "id",
        "type": "String"
    },
    {
        "name": "last_updated_at",
        "type": "Double"
    },
    {
        "name": "location_cell",
        "type": "String"
    }
}

And we want to perform group by operation with all of above attributes (fields) and get a count as a result.

Can we use only aggregate API without any changes to schema to fulfill this requirement? If it is how to set multiple values for uniqueValues? Or should we need to add a new attribute (field) to schema with string concatenation of all of above fields?

Upvotes: 0

Views: 65

Answers (1)

Sajeetharan
Sajeetharan

Reputation: 222572

Yes you can, the maximum depth supported in 5, i.e. you can group by a maximum of 5 properties.

https://learn.microsoft.com/en-us/rest/api/time-series-insights/ga-query-api

Upvotes: 1

Related Questions