Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-662

Allow usage of $apply as "Expand Option" in $expand

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_CS01
    • Fix Version/s: V4.0_CSD03
    • Component/s: Data Aggregation
    • Labels:
      None
    • Environment:

      [Applied]

      Description

      We haven't specified the usage of $apply as "Expand Option" in $expand.
      There are good use cases for $apply as an option of $expand (and it combines very well):

      GET Products?$expand=Sales($apply=aggregate(Amount with sum as Total))

      Returns all products, and the Sales navigation property value is a one-element array with the Total
      Means: per Product in top-level result inline result of

      GET Product(<key>)/Sales?$apply=aggregate(Amount with sum as Total)

      This is equivalent to the clumsier

      GET Products?$apply=groupby((<key properties of Product>,<all non-key structural properties of Product>),aggregate(Sales/(Amount with sum as Total))

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              martinzurmuehl Martin Zurmuehl
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: