How to map rows into columns in visualization data table?

Hello.

I would like to ask question which is similar to the one below but since there was no answer to it, I'd like ask again including examples.

I have a table as below in kibana (7.1.1). This is created by simple terms aggregation

My goal is to create data table as below .

A                   effective_img      speed_limit
000015_0_tsr.AVI                3                3
000013_0_tsr.AVI                0                4

Is this possible ?

The aggregation I am trying to achieve is below.
What I am trying to do here is map B and C to different columns rather than expanding rows. I could do this in Canvas but would like to use user friendly vis table instead .

Aggs

GET tags/_search
{
  "size": 0,
  "aggs": {
    "A": {
      "terms": { "field": "avi.name", "size": 2 },
      "aggs": {
        "B": {
          "filter": { "term": { "shape.model": "effective_img" } },
          "aggs": { "B-1": { "terms": { "field": "shape.model" } } }
        },
        "C": {
          "filter": { "term": { "shape.model": "speed_limit" } },
          "aggs": { "C-1": { "terms": { "field": "shape.model" } } }
        }
      }
    }
  }
}

RESULT

{
  "took" : 52,
  "timed_out" : false,
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : {
      "value" : 1770,
      "relation" : "eq"
    },
    "max_score" : null,
    "hits" : [ ]
  },
  "aggregations" : {
    "A" : {
      "doc_count_error_upper_bound" : 0,
      "sum_other_doc_count" : 1231,
      "buckets" : [
        {
          "key" : "000049_0_tsr.AVI",
          "doc_count" : 285,
          "B" : {
            "doc_count" : 0,
            "B-1" : {
              "doc_count_error_upper_bound" : 0,
              "sum_other_doc_count" : 0,
              "buckets" : [ ]
            }
          },
          "C" : {
            "doc_count" : 39,
            "C-1" : {
              "doc_count_error_upper_bound" : 0,
              "sum_other_doc_count" : 0,
              "buckets" : [
                {
                  "key" : "speed_limit",
                  "doc_count" : 39
                }
              ]
            }
          }
        },
        {
          "key" : "000028_1_tsr.AVI",
          "doc_count" : 254,
          "B" : {
            "doc_count" : 0,
            "B-1" : {
              "doc_count_error_upper_bound" : 0,
              "sum_other_doc_count" : 0,
              "buckets" : [ ]
            }
          },
          "C" : {
            "doc_count" : 32,
            "C-1" : {
              "doc_count_error_upper_bound" : 0,
              "sum_other_doc_count" : 0,
              "buckets" : [
                {
                  "key" : "speed_limit",
                  "doc_count" : 32
                }
              ]
            }
          }
        }
      ]
    }
  }
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.