Unable to load data HELP!

hi guys,

im attempting to run the following but received the error below not sure what is wrong, can someone shed some light?

input {
file {
path => "c:\users\administrator\downloads\chicago-food-inspection\food-inspection.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {

	separator => ","
	
	columns => [ "Inspection ID", "DBA Name", "AKA Name", "License #", "Facility Type", "Risk, Address", "City", "State", "Zip", "Inspection Date","Inspection Type", "Results", "Violations", "Latitude", "Longitude", "Location", 
}

mutate {convert => ["Inspection ID", "integer"] }
mutate {convert => ["License #", "integer"] }
mutate {convert => ["Latitude", "float"] }
mutate {convert => ["Longitude", "float"] }
mutate {
	rename => {
		"Latitude" => [location][lon]"
		"Longitude" => [location] [lat]"
	}
}	

output {
	
	elasticsearch {
	hosts => "locahost:9200"
	index => "food-inspections"
	}

ES Mapping:

Post/food-inspections
{
"settings":{
number_of_shards":1
},
},
"mappings" : {
	"food-inspections": {
    
		"properties" : {
     
	"location" : { "type": "geo_point"},
	"city":{"type":"string"},
	"country":{"type":"string"}
}
}

}

I think you have a syntax problem, at least as posted:

columns => [ "field", ... ,}

It looks like you have a comma after the last field and you close the "[" with "}"

thanks, for the insight. I enclosed it with ] but now I'm getting an error below on line 23. Sorry been at this all day cant see where the error is

Missing double quote before [location]

Validate the yaml with a tool like http://www.yamllint.com/ before testing in logstash. That will catch some errors, probably not the one noted by the other responder.

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