Hello,
Under windows 10, with 7.5.2 ES stack version, I try to make a pipeline from a csv file (";") delimiter to ES but the output is not stable.
For instance it duplicates the result:
The output is:{
"twod" => 0.0,
"oned" => 0.0,
"@timestamp" => 2020-01-25T13:21:09.117Z,
"spot" => 0.0
}
{
"twod" => 6.0,
"oned" => 3.0,
"@timestamp" => 2020-01-25T13:21:09.138Z,
"spot" => 2.0
}
With the following config file:
input {
file {
path => "C:/Users/jutar/OneDrive/Desktop/mktdata.csv"
start_position => "beginning"
sincedb_path => "NUL"
}
}
filter {
csv {
separator => ";"
columns => ["spot","oned","twod"]
remove_field => ["host","path","@version","message"]
}
mutate{convert =>["spot","float"]}
mutate{convert =>["oned","float"]}
mutate{convert =>["twod","float"]}
}
output {
elasticsearch {
hosts => "http://localhost:9200"
index => "mktdata-%{+YYYY.MM.dd}"
}
stdout {}
}
And when using these lines in the config file csv filter:
csv {
autodetect_column_names => true
}
, it sometimes inverts the oupt column, i.e.:
"6" => twod,
"3" => oned,
"@timestamp" => 2020-01-25T13:21:09.138Z,
"2" => spot
My csv file is the following:
"spot" in A1 cell "oned" in B1 and "twod" in C1
"2" in A2 cell "3" in in B2 cell and "6" in C2 cell.
Can anyone know the answer of this strange parsing?
Thank you in advance
Pierre Jutard