← Prev in month
← Prev in thread
Next in thread →
Next in month →
[OASIS Issue Tracker] (ODATA-1186) Clarify names that can appear in annotation of term ApplySupported/Transformations
Gerald Krause created ODATA-1186:
------------------------------------
Summary: Clarify names that can appear in annotation of term ApplySupported/Transformations
Key: ODATA-1186
URL: https://issues.oasis-open.org/browse/ODATA-1186
Project: OASIS Open Data Protocol (OData) TC
Issue Type: Improvement
Components: Extension for Data Aggregation
Affects Versions: V4.0_CSD03
Environment: Proposed
Reporter: Gerald Krause
Fix For: V4.0_CSD04
Currently, nest can be used to create an entity with a single containment navigation property holding the result of a transformation sequence:
{{nest( cnp, t )}} returns
{code}
{ <cnp>: [ <result of t applied to input set> ] }{code}
There are use cases to generalize this and nest the results of _multiple_ transformation sequences at once. Consider, for example, a request to combine the results of two transformations in a single response. Using transformation concat requires an extra computation of a concat index to relate an entity in the result to the corresponding concat argument (see ODATA-1138):
{{GET ~/Sales?$apply=concat(}}
{{ filter(<complex expression 1>)}}
{{ }}{{/groupby((Customer),aggregate(Amount with sum as Total))/compute(1 as concat_index),}}
{{ filter(<complex expression 2>)}}
{{ /groupby((Customer),aggregate(Amount with sum as Total))/compute(2 as concat_index))}}
If it makes sense to keep the results of the two transformations separately, they could be retrieved via an extended syntax of the transformation nest:
{{GET ~/Sales?$apply=nest(}}
{{ filter(<complex expression 1>)}}
{{ /groupby((Customer),aggregate(Amount with sum as Total)) as part_1,}}
{{ filter(<complex expression 2>)}}
{{ /groupby((Customer),aggregate(Amount with sum as Total)) as part_2)}}
--
This message was sent by Atlassian JIRA
(v7.7.2#77003)
← Prev in month
← Prev in thread
Next in thread →
Next in month →