Aggregation support
- Last Updated: September 9, 2022
- 2 minute read
- Hybrid Data Pipeline
- Version 5.0
- Documentation
Hybrid Data Pipeline supports a subset of the functionality defined by the OData Version 4
extension for data aggregation. Aggregation functionality is extended with the
$apply query parameter. See the following sections for
details.
Support summary
The following list summarizes supported aggregation functionality:
- The standard aggregation methods:
summinmaxaveragecountdistinct
- The virtual property
$count - The
groupbytransformation - The
filtertransformation $filterwith$apply$selectwith$apply$orderbywith$apply$topand$skipwith$apply$countwith$apply$countsegment with$apply- Inline
$countwith$apply
Limitations
As stated, Hybrid Data Pipeline supports only a subset of data aggregation
functionality. When a request is made that uses unsupported functionality, the
request fails with a 501 Not Implemented error message that
describes the $apply functionality that is not supported. For
example, if you attempt to use the topcount transformation with
$apply, then a 501 Not Implemented error
message is returned.
Additionally, Hybrid Data Pipeline does not support the $search or
$expand query parameters while also specifying the
$apply query parameter. An attempt to combine
$search or $expand with
$apply will also result in a 501 Not
Implemented error message.
Aggregates
Supported OData aggregates map to SQL aggregates as described in the following table.
| OData aggregate | SQL aggregate | Comment |
|---|---|---|
sum |
sum |
Total of values |
min |
min |
Minimum value |
max |
max |
Maximum value |
average |
avg |
Average value |
countdistinct
|
count(columnname) |
Counts distinct values for expression |
$count
|
count(*) |
Counts number of input rows |
Group By
Hybrid Data Pipeline uses the SQL GROUP BY clause to implement the
OData groupby transformation.
Filtering
For standard queries that do not involve aggregation, Hybrid Data Pipeline uses a SQL
WHERE clause to support the $filter query
parameter. When queries involve aggregation via the $apply query
parameter, a SQL HAVING clause is used in conjunction with a SQL
WHERE to support filtering OData aggregates.