Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
httpete opened this issue Nov 22, 2021 · 0 comments
Open

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

httpete opened this issue Nov 22, 2021 · 0 comments

Comments

@httpete
Copy link

httpete commented Nov 22, 2021

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',
            },
          },
        ],
      },
    },
  };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant