Skip to content

$apply GroupBy Transform not capable of producing the query needed #99

@httpete

Description

@httpete

This query works fine:

$apply=groupby(mfs/ID, aggregate(mfs(im_foo with average as Value)))

But odata-query can't produce that nested 'mfs' part wrapped in the aggregate ()

$apply=groupby(mfs/ID, aggregate(mfs(im_foo with average as Value)))

I tried transform with array, or objects, and nothing can produce that string:

  const transform = {
    groupBy: {
      properties: ['mfs/ID'],
      transform: {
        aggregate: [
          'mfs',
          {
            'mfs/im_Jitter': {
              with: 'average',
              as: 'Value',
            },
            'mfs/im_Latench': {
              with: 'average',
              as: 'Value1',
            },
            'mfs/im_PacketLossPercentage': {
              with: 'average',
              as: 'Value2',
            },
          },
        ],
      },
    },
  };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions