jy94
(Je Ho Yeon)
August 13, 2019, 4:28am
1
Hello, when I trying to parse a csv file, this error message shows up.
input {
file {
path => "/finance/BTC-USD.csv"
start_position => "beginning"
}
}
The filter part of this file is commented out to indicate that it is
optional.
filter {
csv {
separator => ","
columns => ["Date","Open","High","Low","Close","Adj Close","Volume"]
}
date {match => ["Date", "yyyy-MM-dd"]}
mutate {convert => ["Open", "float"]}
mutate {convert => ["High", "float"]}
mutate {convert => ["Low", "float"]}
mutate {convert => ["Close", "float"]}
mutate {convert => ["Adj Close", "float"]}
mutate {convert => ["Volume", "float"]}
}
[Elasticsearch output plugin]
index into Elasticsearch
output {
elasticsearch {
hosts => "localhost:9200"
manage_template => false
index => "daily-finance-price"
}
stdout {}
}
stephenb
(Stephen Brown)
August 13, 2019, 5:29am
2
Hi @jy94
Can you please provide the first couple lines of the the CSV input file in text form formatted with the </>
Looks like an issue with the first line....
jy94
(Je Ho Yeon)
August 13, 2019, 5:42am
3
Date Open High Low Close Adj Close Volume
2014-08-11 592.059998 593.619995 571.719971 575.890015 575.890015 1512262
2014-08-12 575.890015 578.289978 561.97998 567.659973 567.659973 1894843
2014-08-13 567.659973 573.51001 523.150024 542.099976 542.099976 2659458
2014-08-14 542.099976 544.940002 495.940002 504.799988 504.799988 5608470
2014-08-15 504.799988 515.23999 483.209991 496.450012 496.450012 2407799
2014-08-16 496.450012 524.25 483.23999 522.01001 522.01001 1956441
2014-08-17 522.01001 524.710022 478.220001 485.5 485.5 1584568
2014-08-18 485.5 493.26001 449.950012 462.179993 462.179993 2991012
2014-08-19 462.179993 487.049988 455.799988 485.119995 485.119995 2458098
2014-08-20 485.119995 521.840027 468.51001 516.780029 516.780029 2965577
2014-08-21 516.780029 537.169983 511.359985 517.940002 517.940002 2974478
jy94
(Je Ho Yeon)
August 13, 2019, 7:47am
4
I have uploaded the part of csv file
Badger
August 13, 2019, 12:41pm
5
But the message that the csv filter failed to parse looks nothing like that. I think it is complaining about the characters that surround ImExPS/2 Generic Explorer Mouse. They look like W in the image, but I think they are some form of quotes.
system
(system)
Closed
September 10, 2019, 12:41pm
6
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.