Convert string to integer

Hello everyone!
I need help for converting a string data to integer value.
I have an 'Hours' column which consist of numeric data but kibana is reading as string as a result when i try to sort the axis it does not sort properly.

Can someone please tell me steps to convert string to integer?

I use Kibana 7.13.2.

Can you share the mapping for your index, particularly the Hours field?

"hour": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },

The problem is it is reading the heading 'hour' as a result it converts entire field to text.
I created ingest pipeline to convert str to int and reindex but unfortunately it always gives error like "type" : "number_format_exception", "reason" : "for input string: "hour""

Thank you @ghudgins for the solution :grinning:

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