160 likes | 394 Views
OData Extensions for Data Aggregation . Ralf Handl, SAP Hubert Heijkers, IBM Gerald Krause, SAP Mike Pizzo, Microsoft Martin Zurmühl, SAP 20 August 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 August 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)) &$orderby=Amount desc
GET ~/Sales?$apply=groupby((Product),aggregate(Amount)) &$filter=Amount ge 8
GET ~/Sales?$apply=filter(Amount ge8) /groupby((Product),aggregate(Amount))
GET ~/Sales?$apply=groupby((Product),aggregate(Amount, 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))
GET ~/Sales?$apply=groupby((Product,Country),aggregate(Amount)) /groupby((Country),topcount(1,Amount))
GET ~/Sales?$apply=groupby((Product,Country),aggregate(Amount)) /groupby((Country),M.TopCountAndBalance(N=1,A='Amount'))