# Insert CSV to ES

**URL:** <https://discuss.elastic.co/t/insert-csv-to-es/95304>\
**Category:** Logstash\
**Created:** [August 1, 2017, 9:21am UTC](https://discuss.elastic.co/t/insert-csv-to-es/95304 "2017-08-01T09:21:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tals](https://avatars.discourse-cdn.com/v4/letter/t/f1d935/32.png) [@Tals](https://discuss.elastic.co/u/Tals)\
**Post date:** [August 1, 2017, 9:21am UTC](https://discuss.elastic.co/t/insert-csv-to-es/95304/1 "2017-08-01T09:21:11Z")

</div>

Hi  
I'm trying to insert a new CSV file to ES.  
Got Successfully started Logstash API endpoint {:port=\>9600}  
But Nothing Happen.....It seems to me that Logstash uses a previous mapping I made for other file.. .  
Is it ?  
The file looks like this:  
User\_Id,Age,Gender,Occupation,Zip\_Code  
1,24,M,technician,85711  
2,53,F,other,94043  
3,23,M,writer,32067

My Config file looks like this:  
input{  
file{  
path=\>"/Users/office/Desktop/Elasticsearch data/ufo.csv"  
start\_position =\> "beginning"  
sincedb\_path =\> "/dev/null"  
}  
}   
filter{  
csv{  
separator =\> ","  
columns =\>["User\_Id","Age","Gender","Occupation","Zip\_Code"]

```
	}
}

```

output{  
elasticsearch{  
hosts=\>"localhost"  
index=\>"ufo"  
document\_type =\> "found"  
}  
stdout{}  
}  
I got sucssefule massage:  
Sending Logstash's logs to C:/logstash/logs which is now configured via log4j2.properties  
[2017-08-01T11:57:41,211][INFO][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=\>{:removed=\>[], :added=\>[[http://localhost:9200/](http://localhost:9200/)]}}  
[2017-08-01T11:57:41,238][INFO][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck\_url=\>[http://localhost:9200/](http://localhost:9200/), :path=\>"/"}  
[2017-08-01T11:57:41,396][WARN][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=\>#\<URI::HTTP:0x4a4e9cc0 URL:[http://localhost:9200/](http://localhost:9200/)\>}  
[2017-08-01T11:57:41,398][INFO][logstash.outputs.elasticsearch] Using mapping template from {:path=\>nil}  
[2017-08-01T11:57:41,476][INFO][logstash.outputs.elasticsearch] Attempting to install template {:manage\_template=\>{"template"=\>"logstash-_", "version"=\>50001, "settings"=\>{"index.refresh\_interval"=\>"5s"}, "mappings"=\>{"default"=\>{"\_all"=\>{"enabled"=\>true, "norms"=\>false}, "dynamic\_templates"=\>[{"message\_field"=\>{"path\_match"=\>"message", "match\_mapping\_type"=\>"string", "mapping"=\>{"type"=\>"text", "norms"=\>false}}}, {"string\_fields"=\>{"match"=\>"_", "match\_mapping\_type"=\>"string", "mapping"=\>{"type"=\>"text", "norms"=\>false, "fields"=\>{"keyword"=\>{"type"=\>"keyword"}}}}}], "properties"=\>{"@timestamp"=\>{"type"=\>"date", "include\_in\_all"=\>false}, "@version"=\>{"type"=\>"keyword", "include\_in\_all"=\>false}, "geoip"=\>{"dynamic"=\>true, "properties"=\>{"ip"=\>{"type"=\>"ip"}, "location"=\>{"type"=\>"geo\_point"}, "latitude"=\>{"type"=\>"half\_float"}, "longitude"=\>{"type"=\>"half\_float"}}}}}}}}  
[2017-08-01T11:57:41,485][INFO][logstash.outputs.elasticsearch] New Elasticsearch output {:class=\>"LogStash::Outputs::ElasticSearch", :hosts=\>[#\<URI::Generic:0x4a7938dd URL://localhost\>]}  
[2017-08-01T11:57:41,495][INFO][logstash.pipeline] Starting pipeline {"id"=\>"main", "pipeline.workers"=\>4, "pipeline.batch.size"=\>125, "pipeline.batch.delay"=\>5, "pipeline.max\_inflight"=\>500}  
[2017-08-01T11:57:42,322][INFO][logstash.pipeline] Pipeline main started  
[2017-08-01T11:57:42,596][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 29, 2017, 9:21am UTC](https://discuss.elastic.co/t/insert-csv-to-es/95304/2 "2017-08-29T09:21:12Z")

</div>

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