Druid SQL - order by not working


I am using Druid 0.15.0.

I have very simple data :


nse_symbol (string column),


When i execute SQL " select * from druid_sample_DB order by nse_symbol", it is throwing error. Can you please help.

“Unknown exception / Cannot build plan for query: SELECT * FROM (select * from druid_sample_DB ORDER by nse_symbol) LIMIT 5000 / org.apache.druid.java.util.common.ISE”

Regards, Chari.

druid_0.15.0_orderby.docx (76.2 KB)

The DruidSQL “SELECT * FROM …” query can only order by time ASC or DESC (DESC was added in 0.15.0).
If you literally need to do the query you are posting you could turn it into a group by query (on __time and nse_symbol).

Why do you need to get your raw data ordered by something other than time? There might be more efficient workaround.

Hi Vadim,

Iam replicating all the use cases of “self service as BI”, using Tableau.

What is said is true, but there could be use cases where users (from a tool perspective) may want to see raw data of the “aggregated” data shown in a tool, like Tableau.