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

DoubleMax Aggregation not supported #32

Open
Shabhana opened this issue Aug 28, 2019 · 2 comments
Open

DoubleMax Aggregation not supported #32

Shabhana opened this issue Aug 28, 2019 · 2 comments

Comments

@Shabhana
Copy link

Shabhana commented Aug 28, 2019

We have druid-query like below:

var q5 = client.groupBy()
q5.dataSource('stmp_dlv_1')
q5.granularity('month')
q5.dimensions(['txn_mth'])
q5.aggregation('doubleSum', 'GROSS', 'sum_gross')
q5.aggregation('doubleMax', 'NTPV', 'max_global_ntpv')

q5.exec(function(err, result) {
  if (err) {
    // handle error...
    console.log("*****error*****",err)
  }
  else {
    console.log("******result****",result);
  }
})

Getting below error :

/Users/srajathii/Documents/hikma/Site/node_modules/druid-query/lib/fields/aggregations.js:51
    throw new FieldError('Unknown aggregation type: ' + type)
    ^

Error: Unknown aggregation type: doubleMax
    at aggregation (/Users/srajathii/Documents/hikma/Site/node_modules/druid-query/lib/fields/aggregations.js:51:11)
    at exports.aggregation (/Users/srajathii/Documents/hikma/Site/node_modules/druid-query/lib/fields/aggregations.js:18:22)
    at GroupByQuery.proto.(anonymous function) [as aggregation] (/Users/srajathii/Documents/hikma/Site/node_modules/druid-query/lib/query.js:124:27)
    at Object.<anonymous> (/Users/srajathii/Documents/hikma/Site/bin/www:206:4)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)

Also tried
q5.aggregation('max', 'NTPV', 'max_global_ntpv')

getting same error.

Can you please help with a way to find the max value of the metric?

@Shabhana Shabhana changed the title Post Aggregation - not working DoubleMax Aggregation not supported Aug 28, 2019
@netik
Copy link

netik commented Oct 29, 2020

Same goes for floatMax, no support there either.

I think this library is largely incomplete and doesn't support features in the latest druid (0.20)

@netik
Copy link

netik commented Nov 4, 2020

fwiw, I ended up abandoning this library and moving over to Imply Ply and using druidRequestor outside of Ply for JSON queries, which returns promises. It seems to be far more supported.

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

2 participants