0

I have injected data to Druid using tranquility. The data source is visible through overlord's console, all good I can query.

  • Tranquility 0.1.0
  • Druid 12.3
  • Superset 0.1.0

When I attach Druid's datasource to Superset I see that all defined columns are of type String. That is pretty weird because I defined types in the tranquility schema as follow:

"dimensionsSpec": {
  "dimensions": [
   "some_id",    
   {
     "type": "double",
     "name": "total_positions"
   }]
}

I tried to use Calculated Columns and Metrics but when I save those new element are not appearing in Druid. Druid chart -> datasource editor

Did anyone has a similar issue? Is there any way I can change column type in Superset or maybe the schema should be defined some different way.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Pozorada
  • 61
  • 4

2 Answers2

0

We have the same issue on our environment. We were planning to use it in Apache Branch Report.

As a workaround, we've created external table for Druid on Hive and using Hive connector in Superset in order to cast to integer in SQL Lab: https://cwiki.apache.org/confluence/display/Hive/Druid+Integration

However, it would have been much better if Superset charts could interpret numeric dimensions out of the box so that the architecture would be leaner.

Hako
  • 361
  • 1
  • 2
  • 9
  • Apache Branch Report? Has this been released yet? the only problem with SQL Lab is the lack of documentation, it is very hard to do some custom things with it – Pozorada Mar 31 '19 at 23:16
  • Totally agreed! Superset should definitely support numeric dimensions. – Hako Mar 31 '19 at 23:21
0

We faced a similar issue. By default, all dimensions were taken as String. In Tranquility, we used metrixSpec and defined the column as longSum. These columns will reflect as numbers in Superset. Remember to refresh Druid metadata in Superset.

"metricsSpec": [
        {
          "name": "trafficUp",
          "type": "longSum",
          "fieldName": "trafficUp"
        }
]
meril
  • 462
  • 3
  • 13