# Logstash importing .csv data in Elasticsearch

**URL:** <https://discuss.elastic.co/t/logstash-importing-csv-data-in-elasticsearch/159492>\
**Category:** Logstash\
**Created:** [December 5, 2018, 9:06am UTC](https://discuss.elastic.co/t/logstash-importing-csv-data-in-elasticsearch/159492 "2018-12-05T09:06:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![saeed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saeed/32/38500_2.png) [@saeed](https://discuss.elastic.co/u/saeed)\
**Post date:** [December 5, 2018, 9:06am UTC](https://discuss.elastic.co/t/logstash-importing-csv-data-in-elasticsearch/159492/1 "2018-12-05T09:06:17Z")

</div>

Hi  
I use logstash to import data from a csv file. It was successful but makes over plus columns that not exists in my data.  
my config file is  
indent preformatted text by 4 spaces  
input {  
file {  
path =\> "C:/Data/booking/booking.csv"  
start\_position =\> "beginning"  
#sincedb\_path =\> "/dev/null"  
}  
}  
filter {  
csv {  
separator =\> "|"  
columns =\> ["hotelId","HotelName","City"]  
remove\_field =\> ["host", "message", "path", "@timestamp", "@version"]   
}  
}  
output {  
elasticsearch {  
hosts =\> "localhost"  
index =\> "booking"  
document\_type =\> "hotel"  
}  
stdout {}  
}

And there is my index info:  
indent preformatted text by 4 spaces  
{  
"booking" : {  
"aliases" : { },  
"mappings" : {  
"hotel" : {  
"properties" : {  
"City" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"HotelName" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"column4" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"column5" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"column6" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"column7" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"column8" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
},  
"hotelId" : {  
"type" : "text",  
"fields" : {  
"keyword" : {  
"type" : "keyword",  
"ignore\_above" : 256  
}  
}  
}  
}  
}  
},  
"settings" : {  
"index" : {  
"creation\_date" : "1543999132912",  
"number\_of\_shards" : "5",  
"number\_of\_replicas" : "1",  
"uuid" : "\_Xq0aXnZSFyOD3pEYj2nCg",  
"version" : {  
"created" : "6050199"  
},  
"provided\_name" : "booking"  
}  
}  
}  
}

What is column4 ... column8 ?  
How can i handle it?

---

<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:** [January 2, 2019, 9:06am UTC](https://discuss.elastic.co/t/logstash-importing-csv-data-in-elasticsearch/159492/2 "2019-01-02T09:06:17Z")

</div>

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