150 likes | 337 Views
OData Extensions for Data Aggregation . Ralf Handl, SAP Hubert Heijkers, IBM Gerald Krause, SAP Mike Pizzo, Microsoft Martin Zurmühl, SAP 20 December 2013. Where do we want to go. Simple Composable Query Language. $apply= transformation / transformation / … Transformations Subset
E N D
OData Extensions for Data Aggregation Ralf Handl, SAP Hubert Heijkers, IBM Gerald Krause, SAP Mike Pizzo, Microsoft Martin Zurmühl, SAP 20 December 2013
Simple Composable Query Language $apply= transformation/ transformation/ … Transformations Subset topcount(…), topsum(…), …, bottompercent(…), filter(…), identity Reshape aggregate(…), expand(…) Fork & Merge groupby(…, sequence) , concat(sequence, sequence, …) Custom Functions sequence
GET ~/Sales?$apply=groupby((Product), aggregate(Amount with sum as Total))
GET ~/Sales?$apply=groupby((Product), aggregate(Amount with sum as Total)) &$orderby= Totaldesc
GET ~/Sales?$apply=groupby((Product), aggregate(Amount with sum as Total)) &$filter= Totalge 8
GET ~/Sales?$apply=filter(Amount ge 4) /groupby((Product), aggregate(Amount with sum as Total))
GET ~/Sales?$apply=groupby((Product), aggregate(Amount with sum as Total, Amount with max as MaxAmount))
GET ~/Sales?$apply=groupby((Product), aggregate($count as SalesCount))
GET ~/Sales?$apply=groupby((rollup(Country,Customer),rollup(Category,Product)),aggregate(Amount with sum as Total))
GET ~/Sales?$apply=groupby((Product,Country), aggregate(Amount with sum as Total)) /groupby((Country),topcount(1,Total))
GET ~/Sales?$apply=groupby((Product,Country),aggregate(Amount with sum as Total)) /groupby((Country),M.TopCountAndBalance(N=1,A=‘Total'))