Can druid query result be ordered by "timestamp" descending

Hi,
The result of druid query is ordered by “timestamp” ascending default, How can I set the json query to get result by “timestamp” descending?

Thanks,

Hi,

This is actually a common request that people ask for and something that Druid cannot currently support, but we hope to support in the near future. If you are interested in potentially implementing this, we can chat about it in the dev forum. It’ll require reversing cursors in Druid.

Hello,

here is my druid timeseries query

var queryRep = client.timeseries();

queryRep.dataSource(APP_REPORTING_DATA_SOURCE)

.granularity(reqGranularity)

//.limit(maxRecords)

// .descending(true)

.aggregation(‘count’, ‘rows’);

If I enabled .descending(true). it will return .descending() is not function.

can you help me to fix the issue.

This is my first time to see druid in js. What library is this?

Maybe try orderBy function if it exists?

Here is the library: https://www.npmjs.com/package/druid-query

I tried orderBy too. it will only supporting topN, groupBy query. I am using timeseries query.

Let me know if you find any update.

Thanks