Dimensions not shown but query works well

Hi, I’m on druid 0.8.3 because caravel works with 0.8x

I notice that coordinator endpoint api curl -L “:8081/druid/coordinator/v1/datasources?full” show metrics I have defined in real-time digest from kafka, but no dimensions found

[

{

    "name": "data-sea-exp",

    "properties": {

        "client": "side"

    },

    "segments": [

        {

            "binaryVersion": null,

            "dataSource": "data-sea-exp",

            "dimensions": "",

            "identifier": "data-sea-exp_2016-12-17T02:00:00.000+08:00_2016-12-17T03:00:00.000+08:00_2016-12-17T02:00:00.000+08:00",

            "interval": "2016-12-17T02:00:00.000+08:00/2016-12-17T03:00:00.000+08:00",

            "loadSpec": {},

            "metrics": "count,impression,click,like,unlike,collect,uncollect,report,share,comment",

            "shardSpec": {

                "type": "none"

            },

            "size": 0,

            "version": "2016-12-17T02:00:00.000+08:00"

        },

when I do query over realtime endpoint api using some dimension like this

{

“queryType”: “topN”,

“dataSource”: “data-sea-exp”,

“dimension”: “app_id”,

“threshold”: 5,

“metric”: “count”,

“granularity”: “minute”,

“aggregations”: [

{

  "type": "longSum",

  "name": "count",

  "fieldName": "count"

},

{

  "type": "longSum",

  "name": "impression",

  "fieldName": "impression"

},

{

  "type": "longSum",

  "name": "click",

  "fieldName": "click"

}

],

“intervals”: [

"2016-12-17T13:00:00.000+08:00/2016-12-17T14:00:00.000+08:00"

]

}

the dimension works well with query

then I query datasource dimensions/metrics over broker endpoint api

$ curl -L hd-olap-07:8082/druid/v2/datasources/data-sea-exp

{“dimensions”:,“metrics”:[“like”,“unlike”,“count”,“report”,“impression”,“share”,“comment”,“click”,“collect”,“uncollect”]}%

it show all metrics but no dimensions

so I want to know is there anything wrong ?

because caravel==0.9.0 failed to get full dimensions/metrics list using these endpoint api

coordinator endpoint druid/coordinator/v1

broker endpoint druid/v2

let me make it simple

  1. I have defined 10 dimensions and 8 metrics when start real-time node, and no error logging message found

  2. coordinator endpoint api show all metrics but no dimensions

  3. realtime query can deal with dimensions, the result is correct

  4. broker endpoint api show all metrics but not dimensions

is this the reason why I can’t make caravel works well with my druid 0.8.3 ?

thanks in advance

Hey Luan,

Caravel/Superset should work fine with the latest versions of Druid so I would give those a shot. There have been a lot of improvements to metadata querying since 0.8.3. Also we recommend the segment metadata query (http://druid.io/docs/latest/querying/segmentmetadataquery.html) for best results. The other endpoints have an issue that prevents them from always being able to detect dimensions in realtime (which is what you’re running into).

thanks, I’ll give it a try

FYI I am using Caravel with Druid 0.9.1.1. For the coordinator endpoint I specified druid/coordinator/v1/metadata and for the broker endpoint I specified druid/v2 and everything just worked.

–Ben

thank you Ben, I’ll try 0.9 again