Node-druid-query Context and priority


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.


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


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 if you haven’t already, it’s another query library for JS that works in both Node and the browser. 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);