# Logstash csv filter convert option

**URL:** <https://discuss.elastic.co/t/logstash-csv-filter-convert-option/128374>\
**Category:** Logstash\
**Created:** [April 17, 2018, 2:10pm UTC](https://discuss.elastic.co/t/logstash-csv-filter-convert-option/128374 "2018-04-17T14:10:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![annk](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@annk](https://discuss.elastic.co/u/annk)\
**Post date:** [April 17, 2018, 2:10pm UTC](https://discuss.elastic.co/t/logstash-csv-filter-convert-option/128374/1 "2018-04-17T14:10:15Z")

</div>

Hi,

I am trying to add type for my data table columns but it doesnt seem to work.

filter {  
if [type] == "statistics" {  
csv {  
separator =\> ","  
columns =\> ["Queue","closed successful","closed unsuccessful","merged","new","open","Sum"]  
convert =\> { "closed successful" =\> "integer" "closed unsuccessful" =\> "integer" "merged" =\> "integer" "new" =\> "integer" "open" =\> "integer" "Sum" =\> "integer" }  
}  
}  
}

Here is the mapping result

"logstash-2018.04.17": {  
"mappings": {  
"doc": {  
"Sum.keyword": {  
"full\_name": "Sum.keyword",  
"mapping": {  
"keyword": {  
"type": "keyword",  
"ignore\_above": 256  
}  
}  
},  
"Sum": {  
"full\_name": "Sum",  
"mapping": {  
"Sum": {  
**"type": "text"** ,  
"norms": false,  
"fields": {  
"keyword": {  
"type": "keyword",  
"ignore\_above": 256  
}  
}  
}  
}  
}  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![annk](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@annk](https://discuss.elastic.co/u/annk)\
**Post date:** [April 17, 2018, 2:46pm UTC](https://discuss.elastic.co/t/logstash-csv-filter-convert-option/128374/2 "2018-04-17T14:46:23Z")

</div>

This is solved after I deleted previous day's index.

---

<div class="post-metadata">

**Author:** ![annk](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@annk](https://discuss.elastic.co/u/annk)\
**Post date:** [April 18, 2018, 12:30pm UTC](https://discuss.elastic.co/t/logstash-csv-filter-convert-option/128374/3 "2018-04-18T12:30:42Z")

</div>

Hi ,

Can anyone tell me how to remap a field in any given index ?

Thanks

---

<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:** [May 16, 2018, 12:30pm UTC](https://discuss.elastic.co/t/logstash-csv-filter-convert-option/128374/4 "2018-05-16T12:30:42Z")

</div>

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