# Ingest Pipelines - drop empty string fields

**URL:** <https://discuss.elastic.co/t/ingest-pipelines-drop-empty-string-fields/199857>\
**Category:** Elasticsearch\
**Created:** [September 17, 2019, 4:07pm UTC](https://discuss.elastic.co/t/ingest-pipelines-drop-empty-string-fields/199857 "2019-09-17T16:07:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevenstevensod](https://avatars.discourse-cdn.com/v4/letter/s/ecccb3/32.png) [@stevenstevensod](https://discuss.elastic.co/u/stevenstevensod)\
**Post date:** [September 17, 2019, 4:07pm UTC](https://discuss.elastic.co/t/ingest-pipelines-drop-empty-string-fields/199857/1 "2019-09-17T16:07:45Z")

</div>

I've got an ingest pipeline that receives very similar messages from a few different log files. These logfiles have delimiters ";" where some of the fields have no value, but the context of each delimited value does not change. Consider:

```
01/01/01 01:01:01;INFO;doing action;;
01/01/01 01:01:02;INFO;;dir2;dir2

```

f1=datetime, f2=severity, f3=message, f4=sourcedir, f5=destdir  
but sometimes there is no "message", so when I grok extract field3 it could be an empty string.

Is there a clean way in my ingest pipeline to say remove any fields that are empty strings without setting many "remove" entries with "if"s attached?

---

<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 15, 2019, 4:07pm UTC](https://discuss.elastic.co/t/ingest-pipelines-drop-empty-string-fields/199857/2 "2019-10-15T16:07:49Z")

</div>

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