hello , i am trying to load a csv file into elasticsearch via logstash .this is a snippet of my data sets
transaction_date,customer_name,product_name,product_id,price_unit,quantity,fidelity_card_id,discount,category2-24-2017,Roberto Michel,Taillefine aux fruits 0% Fraise - Danone - 500 g (4 x 125Â g),1,556.26,256,4.175E+15,9,yaourt
5-15-2016,Reiko Branchet,"Activia Fibre - Danone - 171,5 g (150 g+21,5Â g)",2,612.98,163,3.74284E+14,8,yaourt
i used in the configuration of the pipeline mutate and convert to change string fields into numeric ones because elasticsearch store fields by default as strings but the problem appeared when i used this
date {
match => {transaction_date , "MM dd yyyy"} }
in order to convert this field from string into date format
this is th error i 've got when running logsatsh
Cannot create pipeline {:reason=>"Expected one of #, => at line 26, column 29 (byte 713) after filter {\n csv {\n separator => ","\n\t#transaction_date,customer_name,product_name,product_id,price_unit,quantity,fidelity_card_id,discount\n columns => ["transaction_date","customer_name","product_name","product_id","price_unit","quantity","fidelity_card_id","discount"]\n} \nmutate\t{\t\t\nconvert =>{"discount" => "integer"\t}\t\t\t\t\t\nconvert =>{"price_unit" =>"float"}\t\t\t\t\t\t\t\nconvert =>{"product_id" =>"integer"}\t\t\t\t\t\t\t\nconvert =>{"quantity"=> "integer"}\t\t\t\t\t\n\n}\n\ndate {\n\tmatch => {transaction_date "}
2017-07-28 19:26:49,905 Api Webserver ERROR No log4j2 configuration file found. Using default configuration: logging only errors to the console.
this my config file (the filter part)
filter {
csv {
separator => ","
#transaction_date,customer_name,product_name,product_id,price_unit,quantity,fidelity_card_id,discount
columns => ["transaction_date","customer_name","product_name","product_id","price_unit","quantity","fidelity_card_id","discount"]
}
mutate {
convert =>{"discount" => "integer" }
convert =>{"price_unit" =>"float"}
convert =>{"product_id" =>"integer"}
convert =>{"quantity"=> "integer"}
}
date {
match => {transaction_date ,"MM dd yyyy"}}
}
please any help !!! how could i change the type of this field ??