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

Facilitate processing of aggregated results created with concat

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: V4.0_CSD03
    • Fix Version/s: V4.0_CSD04
    • Labels:
      None
    • Environment:

      Proposed

    • Proposal:
      Hide

      No action as this can be solved by the client e.g. using compute():

      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))

      Show
      No action as this can be solved by the client e.g. using compute(): 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))

      Description

      The concat transformation creates a potentially heterogeneous result set consisting of entities with different structures.

      The result is a contiguous list of entities without explicit boundaries to separate the result entities created by one concat parameter from the next. In case an OData client needs to know the concat parameter to which a result entity is related, it has to evaluate the result entities with the same or similar logic expressed in the request a second time.

      Example:
      Using the example model from the Data Aggregation extension, consider a request to retrieve sales amounts grouped by customer for two different subsets of sales entities qualified by complex filter expressions:

      GET ~/Sales?$apply=concat(
      filter(<complex expression 1>)/groupby((Customer),aggregate(Amount with sum as Total)),
      filter(<complex expression 2>)/groupby((Customer),aggregate(Amount with sum as Total)))

      Which is the last entity in the result collection that matches complex expression 1?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gerald.krause1 Gerald Krause
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: