Querying empty multi-value dimensions

Hello,

Is it possible to get results back for empty multi-value dimensions?

I had been playing with various queries against a small set of data and noticed inconsistent results between groupBy and topN.

groupBy query:

{

“queryType”: “groupBy”,

“dataSource”: “multitest”,

“intervals”: [

"2017-03-08/2017-03-19"

],

“granularity”: “all”,

“dimensions”: [

"outcome",

"department"

],

“aggregations”: [

{

  "type": "longSum",

  "name": "count",

  "fieldName": "count"

}

]

}

groupBy results:

[ {

“version” : “v1”,

“timestamp” : “2017-03-08T00:00:00.000Z”,

“event” : {

"count" : 1,

"department" : null,

"outcome" : "I"

}

}, {

“version” : “v1”,

“timestamp” : “2017-03-08T00:00:00.000Z”,

“event” : {

"count" : 22,

"department" : null,

"outcome" : "S"

}

}, {

“version” : “v1”,

“timestamp” : “2017-03-08T00:00:00.000Z”,

“event” : {

"count" : 1,

"department" : "Sales",

"outcome" : "S"

}

}, {

“version” : “v1”,

“timestamp” : “2017-03-08T00:00:00.000Z”,

“event” : {

"count" : 3,

"department" : "Service",

"outcome" : "S"

}

} ]

topN query:

{

“queryType”: “topN”,

“dataSource”: “multitest”,

“intervals”: [

“2017-03-18/2017-03-19”

],

“granularity”: “all”,

“dimension”: {

“dimension”: “department”,

“type”: “default”

},

“metric”: “count”,

“threshold”: 1000000,

“aggregations”: [

{

“name”: “count”,

“type”: “count”

},

{

“type”: “longSum”,

“name”: “su”,

“fieldName”: “su”

},

{

“type”: “longSum”,

“name”: “una”,

“fieldName”: “una”

},

{

“type”: “longSum”,

“name”: “rta”,

“fieldName”: “rta”

},

{

“type”: “longSum”,

“name”: “hta”,

“fieldName”: “hta”

},

{

“type”: “longSum”,

“name”: “iva”,

“fieldName”: “iva”

}

]

}

topN results:

[ {

“timestamp” : “2017-03-18T09:00:00.000Z”,

“result” : [ {

"su" : 3,

"hta" : 0,

"iva" : 0,

"count" : 3,

"una" : 0,

"department" : "Service",

"rta" : 0

}, {

"su" : 1,

"hta" : 0,

"iva" : 0,

"count" : 1,

"una" : 0,

"department" : "Sales",

"rta" : 0

} ]

My assumption was that there would be an additional record in the topN results for all empty "department"s. Something like:

{

“su”: 22,

“hta”: 0,

“iva”: 1,

“count”: 23,

“una”: 0,

“department”: null,

“rta”: 0

}

Is this assumption correct?

Hi, topN queries can be thought of as groupBys with a single dimension. In this case, the used dimension for topN is ‘department’. However, there are two dimensions (‘dimension’ and ‘outcome’) in your groupBy. Would you check again with the same dimension?

Jihoon

2017년 3월 21일 화요일 오전 8시 51분 5초 UTC+9, K Boo 님의 말:

groupBy query:
{

“queryType”: “groupBy”,

“dataSource”: “multitest”,

“intervals”: [

"2017-03-08/2017-03-19"

],

“granularity”: “all”,

“dimensions”: [

"department"

],

“aggregations”: [

{

  "type": "longSum",

  "name": "count",

  "fieldName": "count"

}

]

}

groupBy results:

[ {

“version” : “v1”,

“timestamp” : “2017-03-08T00:00:00.000Z”,

“event” : {

"department" : null,

"count" : 23

}

}, {

“version” : “v1”,

“timestamp” : “2017-03-08T00:00:00.000Z”,

“event” : {

"department" : "Sales",

"count" : 1

}

}, {

“version” : “v1”,

“timestamp” : “2017-03-08T00:00:00.000Z”,

“event” : {

"department" : "Service",

"count" : 3

}

} ]

Without the “outcome” dimension, the groupBy query appears to still provide a null result.

Sorry for late response. I’ll further investigate.

Jihoon

2017년 3월 22일 (수) 오전 1:47, K Boo go4ble23@gmail.com님이 작성: