Kulasangar
Kulasangar

Reputation: 9434

Is it possible to convert a string into an int, in Kibana?

I'm trying to create a data table using kibana for a set of data in an index. I'm having a field in my database which is a String, and I have to convert it to an int so that I could use it for the sum aggregation in Kibana metrics.

Is there a way that I can directly convert it through Kibana or should I go with the logstash and do the conversion first?

Upvotes: 1

Views: 3877

Answers (1)

Alcanzar
Alcanzar

Reputation: 17155

Once the value is in Elasticsearch as a string, there's no way to change it to an integer. You'll have to drop your index and re-index the data.

At that point you can add an index template or use a convert filter in logstash to convert the string to an integer.

Upvotes: 3

Related Questions