# How to handle missing values for date datatype while ingesting the data in Elasticsearch

**URL:** https://discuss.elastic.co/t/how-to-handle-missing-values-for-date-datatype-while-ingesting-the-data-in-elasticsearch/320524
**Category:** Elasticsearch
**Created:** [December 6, 2022, 5:13am UTC](https://discuss.elastic.co/t/how-to-handle-missing-values-for-date-datatype-while-ingesting-the-data-in-elasticsearch/320524 "2022-12-06T05:13:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Durga\_Prasad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/durga_prasad/32/97582_2.png) [@Durga\_Prasad](https://discuss.elastic.co/u/Durga_Prasad)
#### Post date: [December 6, 2022, 5:13am UTC](https://discuss.elastic.co/t/how-to-handle-missing-values-for-date-datatype-while-ingesting-the-data-in-elasticsearch/320524/1 "2022-12-06T05:13:54Z")

</div>

There are few empty values for date datatype field in a csv file. So, while ingesting the data in Kibana (uploading csv file), getting the below error.

Some documents could not be imported

1445 out of 45436 documents could not be imported. This could be due to lines not matching the Grok pattern.

Failed documents

1of86

234: field [eol] not present as part of path [eol]

{"message":"SJADGFF,Installed,vmware photon os 3,Linux container,not\_found,Vmware Photon,,"}

324: field [eol] not present as part of path [eol]

{"message":"HGSFHJF,Installed,vmware photon os 3,Linux container,not\_found,Vmware Photon,,"}

546: field [eol] not present as part of path [eol]

{"message":"JJADSDVN,Installed,vmware photon os 3,Linux container,not\_found,Vmware Photon,,"}

Basically, the documents with empty values for EOL (date datatype) field are not being ingested into Elasticsearch.

Any help, please?

---

<div class="post-metadata">

### Author: ![Venkata\_Raja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkata_raja/32/114264_2.png) [@Venkata\_Raja](https://discuss.elastic.co/u/Venkata_Raja)
#### Post date: [December 6, 2022, 6:22am UTC](https://discuss.elastic.co/t/how-to-handle-missing-values-for-date-datatype-while-ingesting-the-data-in-elasticsearch/320524/2 "2022-12-06T06:22:04Z")

</div>

Hi,

You can use [null\_value](https://www.elastic.co/guide/en/elasticsearch/reference/current/null-value.html) parameter in mapping to hard code a date value if a field value is null.

**The `null_value` parameter allows you to replace explicit `null` values with the specified value so that it can be indexed and searched.**

---

<div class="post-metadata">

### Author: ![Durga\_Prasad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/durga_prasad/32/97582_2.png) [@Durga\_Prasad](https://discuss.elastic.co/u/Durga_Prasad)
#### Post date: [December 14, 2022, 5:45am UTC](https://discuss.elastic.co/t/how-to-handle-missing-values-for-date-datatype-while-ingesting-the-data-in-elasticsearch/320524/3 "2022-12-14T05:45:47Z")

</div>

Hi,

Thanks for your response. Where do you want me to make these changes?

I am uploading the CSV file directly in Kibana. Do you want me to keep the blank values as is in CSV file? Or replacing blank values with null\_value in CSV file?

Could you please explain how to proceed on this a bit elaborate?

---

<div class="post-metadata">

### Author: ![Venkata\_Raja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkata_raja/32/114264_2.png) [@Venkata\_Raja](https://discuss.elastic.co/u/Venkata_Raja)
#### Post date: [December 14, 2022, 5:49am UTC](https://discuss.elastic.co/t/how-to-handle-missing-values-for-date-datatype-while-ingesting-the-data-in-elasticsearch/320524/4 "2022-12-14T05:49:12Z")

</div>

Hi,

When uploading file in kibana, after clicking on import , click on advanced part and you can customize mappings , put above mapping for the fields where you will get empty values.

---

<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: [January 11, 2023, 5:49am UTC](https://discuss.elastic.co/t/how-to-handle-missing-values-for-date-datatype-while-ingesting-the-data-in-elasticsearch/320524/5 "2023-01-11T05:49:50Z")

</div>

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