How can I import data that belongs to array?


I want to separate STRING into ARRAY and get a count.

The example is as follows. (Table)

Name Count
MG3 | 2
MG4 | 1

When set through KIBANA LENS, it is only enabled as a keyword, and when set, only the count of record option is enabled.

When set to count of record, of course, this data changes as below.

MG3 | 1
MG4 | 1

Is there a good way?

Hi, as you might be aware all mapping types in Elasticsearch are arrays due to the way Elasticsearch works. There is an aggregation that's able to calculate the count of the array field, which is called Value Count, but it's not supported by Lens.

As a workaround, you can create a scripted field that returns the size of the grade values array, and then take the sum in Lens.

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