Why number is not recognized as integer

Hi

Here is my sample data

Madhya Pradesh;22.9734;78.6569;57766;764338;7558
Maharashtra;19.7515;75.7139;351005;5579897;88620
Manipur;24.6637;93.9063;6534;44089;688

Logstash considered the text and float but it doesn't recognize the integer (last 3 values in a row)

image

and here is my lsdp.conf

input {
file {
path => "/home/noname/Desktop/lsdp.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {
separator => ";"
columns => ["State", "latitude", "longitude", "ActiveCases", "TotalPositive", "TotalDeath"]
}
mutate {
convert => {
"latitude" => "float"
"longitude" => "float"
"Cases" => "integer"
"Recovered" => "integer"
"Death" => "integer"
}
}
mutate {
rename => {
"longitude" => "[location][lon]"
"latitude" => "[location][lat]"
}
}
}
output {
elasticsearch {
hosts => "http://192.168.0.102:9200"
index => "lsdp"
}
stdout {codec => rubydebug}
}

and the index

PUT lsdp
{
"mappings": {
"properties": {
"location": {
"type": "geo_point"
}
}
}
}

can anyone help me out

Thanks in advance

These three do not match the column names in the csv, so they have no effect.

Note that once you change them it will still not affect elasticsearch until it rolls over to a new index. Once a field in an index is a string in elasticsearch it cannot be changed.

Thanks a lot

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