4

My question is actually a two-part question:

  1. How to do pagination on select queries with Druid SQL. I know that pagination is supported in Druid native query, but I'd like to use SQL if possible
  2. How to do pagination for aggregation queries(group by, topN)? From the docs, I've got a feeling that it's not supported. If so, how do people implement it? One of the solutions - page inside the application code, but it's very inefficient for large reports.
Artem Vovsia
  • 1,520
  • 9
  • 15

1 Answers1

2

You are correct. Only Select queries support pagination. Queries with aggregations do not support this.

I don't think the SQL language of druid support the pagination yet. It is not documented here: https://druid.apache.org/docs/latest/querying/sql.html

If you are having trouble querying druid, and you are a PHP user, you could give this package a try: https://github.com/level23/druid-client

It has a query builder which makes life a little bit more simple.

58k723f1
  • 579
  • 2
  • 15