# Csv filtering misses 2 first columns

**URL:** <https://discuss.elastic.co/t/csv-filtering-misses-2-first-columns/103367>\
**Category:** Logstash\
**Created:** [October 10, 2017, 1:04pm UTC](https://discuss.elastic.co/t/csv-filtering-misses-2-first-columns/103367 "2017-10-10T13:04:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![f1ccb489d33b33a0f12a](https://avatars.discourse-cdn.com/v4/letter/f/2bfe46/32.png) [@f1ccb489d33b33a0f12a](https://discuss.elastic.co/u/f1ccb489d33b33a0f12a)\
**Post date:** [October 10, 2017, 1:04pm UTC](https://discuss.elastic.co/t/csv-filtering-misses-2-first-columns/103367/1 "2017-10-10T13:04:38Z")

</div>

i'm having a csv file with n columns in the format of:  
1Col,2Col,.........,n-1Col, nCol

all my data is parsed fine with the right headers names.  
all except the 2 first columns.  
the 2 first columns are shown in kibana as "column1" and "column2".

i cant figure out the problem.  
i tried deleteing all the previous data that i entered that had different formats of headers and still no success.

my config file is:

input {  
beats {  
client\_inactivity\_timeout =\> 1200  
port =\> 5044  
}  
}  
filter {  
grok {  
break\_on\_match =\> false  
match =\> { "source" =\> "^._?(?[^\/]_).csv$" } # filename parsing  
}  
csv {  
autodetect\_column\_names =\> true  
autogenerate\_column\_names =\> true  
skip\_empty\_columns =\> true  
}  
mutate { add\_field =\> { "[@metadata][filename]" =\> "%{filename}" } }  
mutate { lowercase =\> ["[@metadata][filename]" ] }  
}  
output {  
elasticsearch {  
hosts =\> ["[http://localhost:9200](http://localhost:9200)"]  
manage\_template =\> false  
index =\> "%{[@metadata][beat]}-%{[@metadata][filename]}"  
document\_type =\> "%{[@metadata][type]}"  
user =\> "elastic"  
password =\> "1234"  
}  
}

---

<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:** [November 7, 2017, 1:04pm UTC](https://discuss.elastic.co/t/csv-filtering-misses-2-first-columns/103367/2 "2017-11-07T13:04:53Z")

</div>

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