Node-druid-query Context and priority

Hello,

Is anyone here using node-druid-query, a node.js tool for druid, and more specifically the query context with a data object?

I don’t know how to use it and the doc is very poor on this subject.

Query context(data)

Set context field. Read more about it here.

Arguments

  • data object
  • timeout number
  • priority number
  • queryId string
  • useCache boolean
  • populateCache boolean
  • bySegment boolean
  • finalize boolean
    Thanks,

Ben

Hey Ben,

I’m not familiar with node-druid-query, but what are you trying to do exactly? For most Druid queries there is no need to set anything in the context. “timeout” and “priority” can be generally useful; the others are mostly for debugging or for internal use.

You could also take a look at http://plywood.imply.io/ if you haven’t already, it’s another query library for JS that works in both Node and the browser. Pivot (https://github.com/implydata/pivot) uses it.

Hey Gian,

Thanks for your answer.

I found the solution, but it’s really not trivial.

I share it here for those who want to know: client.context(‘priority’,1);

Ben