# Remove\_field for "type" is not working

**URL:** <https://discuss.elastic.co/t/remove-field-for-type-is-not-working/102618>\
**Category:** Logstash\
**Created:** [October 3, 2017, 9:19pm UTC](https://discuss.elastic.co/t/remove-field-for-type-is-not-working/102618 "2017-10-03T21:19:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![surajbs](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@surajbs](https://discuss.elastic.co/u/surajbs)\
**Post date:** [October 3, 2017, 9:19pm UTC](https://discuss.elastic.co/t/remove-field-for-type-is-not-working/102618/1 "2017-10-03T21:19:24Z")

</div>

Hi,

I am using multiple files as input, where type =\> csv is for loading csv file into elatsicsearch and type =\> syslog is for tracking the exception.

My config looks like below:

input  
{  
file {  
path =\> "path-to-csv-file/\*.csv"  
type =\> "csv"  
start\_position =\> beginning  
}  
file {  
path =\> "path-to-log-file/logstash-plain.log"  
type =\> "syslog"  
sincedb\_path =\> "null"  
}  
}  
filter  
{  
if [type] == "csv"  
{  
csv  
{  
columns =\> [............................]  
separator =\> ","  
}  
mutate  
{  
remove\_field =\> ["message","path","host","type"]  
}  
}  
if [type] == "syslog"  
{ .......................}  
}  
output  
{  
if [type] == "csv"  
{  
elasticsearch  
{ ................ }  
}  
if [type] == "syslog"  
{ .................}  
stdout{}  
}

Any ideas how can I make it work.

Thank you.

---

<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:** [October 31, 2017, 9:19pm UTC](https://discuss.elastic.co/t/remove-field-for-type-is-not-working/102618/2 "2017-10-31T21:19:30Z")

</div>

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