Import csv file to elastic search

I am trying to ulpoad csv file from logstash to my elastic cloud cluster using below config

input {
stdin {
type => "stdin-type"
}
file {
path => ["/pipelines/Data.csv"]
start_position => "beginning"
}
}

filter {
csv {
columns => columns => ["Branch","State","Category","Sub Category","Month","Date"]
}
}

output {

elasticsearch {
     hosts => "https://f8f0fdbb28d6340678149e5f.us-east-1.aws.found.io:9243"
     index => "datanew"
	 user => elastic
     password => password
  }

}

but i am getting ConfigurationError

LogStash::ConfigurationError", :message=>"Expected one of #, {, ", ', } at line 13

You have one "columns =>" too many.

thanks.
Is there any support for defining mapping of file columns to index field?

in filter you write 2 times columns you write only this

filter { csv { columns => [" your columns "] } }

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