# Last empty field

**URL:** <https://discuss.elastic.co/t/last-empty-field/271980>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [May 3, 2021, 12:44pm UTC](https://discuss.elastic.co/t/last-empty-field/271980 "2021-05-03T12:44:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emanuel\_Prado](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emanuel_prado/32/82426_2.png) [@Emanuel\_Prado](https://discuss.elastic.co/u/Emanuel_Prado)\
**Post date:** [May 3, 2021, 12:44pm UTC](https://discuss.elastic.co/t/last-empty-field/271980/1 "2021-05-03T12:44:07Z")

</div>

How can I get it to be ingested when the last information field is empty?

Example all fields complete:  
**05.03.2021 06:20:00;BTUC8;10168.00;66.66;66.39;0.00;1.60**  
**05.03.2021 06:20:00;BTUC8;10168.00;66.66;66.39;0.00;1.60**  
**05.03.2021 06:20:00;BTUC8;10168.00;66.66;66.39;0.00;1.60**

Example last field empty:  
**05.03.2021 06:20:00;BTUC8;10168.00;66.66;66.39;0.00;**  
**05.03.2021 06:20:00;BTUC8;10168.00;66.66;66.39;0.00;**  
**05.03.2021 06:20:00;BTUC8;10168.00;66.66;66.39;0.00;**

I already tried this but it doesn't work (It only works when there is value in the last field):

**{**  
**"set": {**  
**"field": "LastField",**  
**"value": 0.0**  
**}**  
**},**

Thanks!

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [May 3, 2021, 2:59pm UTC](https://discuss.elastic.co/t/last-empty-field/271980/2 "2021-05-03T14:59:37Z")

</div>

Hey,

is it possible that you provide a fully reproducible example with more context? otherwise it will be really hard to help.

Thank you!

--Alex

---

<div class="post-metadata">

**Author:** ![Emanuel\_Prado](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/emanuel_prado/32/82426_2.png) [@Emanuel\_Prado](https://discuss.elastic.co/u/Emanuel_Prado)\
**Post date:** [May 3, 2021, 3:29pm UTC](https://discuss.elastic.co/t/last-empty-field/271980/3 "2021-05-03T15:29:39Z")

</div>

Hi Alex, here more info:

**FILE .conf**

input {  
file {  
type =\> "Prueba"  
path =\> "/XX/BSC\*.csv"  
start\_position =\> "beginning"  
ignore\_older =\> 360000  
max\_open\_files =\> 10000  
}  
}

output {  
if "Prueba" == [type] {  
elasticsearch {  
index =\> "index"  
hosts =\> ["[https://xx.xx.xx.xx:9200](https://xx.xx.xx.xx:9200)"]  
pipeline =\> "BSC"  
ssl =\> true  
ssl\_certificate\_verification =\> false  
manage\_template =\> false  
}  
}  
}

**BSC pipeline**

PUT \_ingest/pipeline/BSC  
{  
"description": "BSC",  
"processors": [  
{  
"csv": {  
"field": "message",  
"target\_fields": [  
"TIMESTAMP",  
"Field 2",  
"Field 3",  
"Field 4",  
"Field 5",  
"Field 6",  
"Last Field"  
],  
"separator": ";"  
}  
},

```
{
  "date": {
    "field": "TIMESTAMP",
    "target_field": "@timestamp",
    "formats": [
      "MM.dd.YYYY HH:mm:ss"
    ],
    "timezone": "America/Argentina/Cordoba"
  }
},
{
  "remove": {
    "field": [
      "TIMESTAMP",
      "message",
      "host",
      "path"
    ]
  }
}

```

]  
}

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 31, 2021, 3:30pm UTC](https://discuss.elastic.co/t/last-empty-field/271980/4 "2021-05-31T15:30:22Z")

</div>

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