Support Questions
Find answers, ask questions, and share your expertise

Superset Druid query definition


Superset Druid query definition

Super Collaborator


I am looking for a way to get only the very last row of data from a Druid cube into a Superset dashboard. Actually the data set is a time series and in a dashboard I want to present the very last state, so the row with the highest timestamp (' ts2' ). On the Druid side I made sure the data is not aggregated (by including the ts2 field as a dimension field)

My Druid datasource has the following fields:


So I thought if I put the query like this (granularity ALL, all fields in the NOT GROUPED BY box):


it should return the atomic, non aggregated rows and if I sort by the time stamp 'ts2' I should be able to return only the last row of data:

But it doesn't. Looking at the Druid query definition Superset creates out of this it makes sense:


  "queryType": "timeseries",
  "intervals": "2018-03-20T14:43:23+00:00/2018-03-27T14:43:23+00:00",
  "granularity": "all",
  "postAggregations": [],
  "aggregations": [
      "type": "count",
      "name": "count"
  "dataSource": "webmetricsIIts2"

None of my requested dimension columns of NOT GROUPED BY input box are in the query def.

Anyone got an idea how to do this?


Re: Superset Druid query definition


Hi Jasper, Changing the visualization type to Big Number should work and display it as a Big Number, After that you will need to click on "Save As" button and add this slice to any dashboard of your choice.

Don't have an account?