Metric showing up as a dimension when using kafka ingestion

Version is Druid 0.9.2.

I am working with one of my developers to prototype using Druid in our stream processing platform. Right now we are working on just understanding how what goes in ends up looking in superset (and eventually our own queries).

What we have noticed so far is that our test data set (10 json records in Kafka) while ingesting correctly, puts things in the wrong places. We have 22 dimensions and a single metric, however the metric shows up as a column, which a metadata query confirms. Additionally, when attempting to query data from superset we get “no data was returned” even though the druid console shows data as being there and sharded/segmented properly.

Here is the metaquery I use:

{

“queryType”:“segmentMetadata”,

“dataSource”:“primaryDeviceInfo2”,

“intervals”:[“2017-01-01/2018-01-01”]

}

Segment/shard snippet from metaquery:

{

“id” : “primaryDeviceInfo2_2017-11-02T18:00:00.000Z_2017-11-02T19:00:00.000Z_2017-11-02T18:15:35.747Z_1”,

“intervals” : [ “2017-11-02T18:00:00.000Z/2017-11-02T19:00:00.000Z” ],

“columns” : {

“__time” : {

“type” : “LONG”,

“hasMultipleValues” : false,

“size” : 10,

“cardinality” : null,

“minValue” : null,

“maxValue” : null,

“errorMessage” : null

},

“city” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 6,

“cardinality” : 1,

“minValue” : “Austin”,

“maxValue” : “Austin”,

“errorMessage” : null

},

“country” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 2,

“cardinality” : 1,

“minValue” : “US”,

“maxValue” : “US”,

“errorMessage” : null

},

“customerID” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 36,

“cardinality” : 1,

“minValue” : “4254d035-f1f0-45b4-9a9c-013f9099235a”,

“maxValue” : “4254d035-f1f0-45b4-9a9c-013f9099235a”,

“errorMessage” : null

},

“deviceSignature” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 3,

“cardinality” : 1,

“minValue” : “Dev”,

“maxValue” : “Dev”,

“errorMessage” : null

},

“hardwareModel” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 6,

“cardinality” : 1,

“minValue” : “”,

“maxValue” : “”,

“errorMessage” : null

},

“hardwarePN” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 14,

“cardinality” : 1,

“minValue” : “”,

“maxValue” : “”,

“errorMessage” : null

},

“hardwareRevision” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 1,

“cardinality” : 1,

“minValue” : “A”,

“maxValue” : “A”,

“errorMessage” : null

},

“macAddress” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 17,

“cardinality” : 1,

“minValue” : “00:00:00:00:00:00”,

“maxValue” : “00:00:00:00:00:00”,

“errorMessage” : null

},

“manufacturer” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 7,

“cardinality” : 1,

“minValue” : “”,

“maxValue” : “”,

“errorMessage” : null

},

“powerSource” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 3,

“cardinality” : 1,

“minValue” : “PoE”,

“maxValue” : “PoE”,

“errorMessage” : null

},

“productFamily” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 4,

“cardinality” : 1,

“minValue” : “”,

“maxValue” : “”,

“errorMessage” : null

},

“realIP” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 13,

“cardinality” : 1,

“minValue” : “”,

“maxValue” : “”,

“errorMessage” : null

},

“region” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 2,

“cardinality” : 1,

“minValue” : “TX”,

“maxValue” : “TX”,

“errorMessage” : null

},

“regionCode” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 2,

“cardinality” : 1,

“minValue” : “US”,

“maxValue” : “US”,

“errorMessage” : null

},

“roomID” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 36,

“cardinality” : 1,

“minValue” : “77f79221-3a8d-4984-a8e9-efccc7e84ea8”,

“maxValue” : “77f79221-3a8d-4984-a8e9-efccc7e84ea8”,

“errorMessage” : null

},

“serialNumber” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 12,

“cardinality” : 1,

“minValue” : “000000000000”,

“maxValue” : “000000000000”,

“errorMessage” : null

},

“siteID” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 36,

“cardinality” : 1,

“minValue” : “7ff32290-7ff8-4140-ac17-3217e96291c2”,

“maxValue” : “7ff32290-7ff8-4140-ac17-3217e96291c2”,

“errorMessage” : null

},

“softwareRelease” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 11,

“cardinality” : 1,

“minValue” : “5.4.0.10182”,

“maxValue” : “5.4.0.10182”,

“errorMessage” : null

},

“tenantID” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 36,

“cardinality” : 1,

“minValue” : “9384b5bf-52a1-40f0-8faa-83f9d82c49fd”,

“maxValue” : “9384b5bf-52a1-40f0-8faa-83f9d82c49fd”,

“errorMessage” : null

},

“trigger” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 13,

“cardinality” : 1,

“minValue” : “uploadCommand”,

“maxValue” : “uploadCommand”,

“errorMessage” : null

},

“updaterVersion” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 11,

“cardinality” : 1,

“minValue” : “5.6.0.14237”,

“maxValue” : “5.6.0.14237”,

“errorMessage” : null

},

“uploadTime” : {

“type” : “STRING”,

“hasMultipleValues” : false,

“size” : 24,

“cardinality” : 1,

“minValue” : “2017-11-02T08:44:55.0003”,

“maxValue” : “2017-11-02T08:44:55.0003”,

“errorMessage” : null

},

“zip_sum” : {

“type” : “FLOAT”,

“hasMultipleValues” : false,

“size” : 8,

“cardinality” : null,

“minValue” : null,

“maxValue” : null,

“errorMessage” : null

}

},

“size” : 337,

“numRows” : 1,

“aggregators” : null,

“timestampSpec” : null,

“queryGranularity” : null,

“rollup” : null

}

Json submitted to the supervisor:

{

“type”: “kafka”,

“dataSchema”: {

“dataSource”: “primaryDeviceInfo3”,

“parser”: {

“type”: “string”,

“parseSpec”: {

“format”: “json”,

“timestampSpec”: {

“column”: “arrivalTime”,

“format”: “auto”

},

“dimensionsSpec”: {

“dimensions”: [

“uploadTime”,

“siteID”,

“roomID”,

“tenantID”,

“customerID”,

“macAddress”,

“serialNumber”,

“realIP”,

“country”,

“region”,

“city”,

“trigger”,

“manufacturer”,

“productFamily”,

“hardwareModel”,

“hardwareRevision”,

“regionCode”,

“hardwarePN”,

“softwareRelease”,

“updaterVersion”,

“powerSource”,

“deviceSignature”

],

“dimensionExclusions”: [

“infoType”,

“ll”,

“range”,

“zip_sum”,

“metro”

]

}

}

},

“metricsSpec”: [

{

“name”: “zip_sum”,

“fieldName”: “zip”,

“type”: “doubleSum”

}

],

“granularitySpec”: {

“type”: “uniform”,

“segmentGranularity”: “HOUR”,

“queryGranularity”: “NONE”

}

},

“tuningConfig”: {

“type”: “kafka”,

“maxRowsPerSegment”: 5000000

},

“ioConfig”: {

“topic”: “DeviceInfo.primaryDeviceInfo”,

“consumerProperties”: {

“bootstrap.servers”: “hanalytics-ambari-master-scus-1:6667,hanalytics-ambari-master-scus-2:6667,hanalytics-ambari-master-scus-3:6667”

},

“taskCount”: 1,

“replicas”: 1,

“taskDuration”: “PT10S”

}

}