# Date data type null value indexing from csv import

**URL:** https://discuss.elastic.co/t/date-data-type-null-value-indexing-from-csv-import/212585
**Category:** Elasticsearch
**Tags:** elastic-stack-machine-learning
**Created:** [December 20, 2019, 2:31am UTC](https://discuss.elastic.co/t/date-data-type-null-value-indexing-from-csv-import/212585 "2019-12-20T02:31:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sadeshdrj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sadeshdrj/32/59324_2.png) [@sadeshdrj](https://discuss.elastic.co/u/sadeshdrj)
#### Post date: [December 20, 2019, 2:31am UTC](https://discuss.elastic.co/t/date-data-type-null-value-indexing-from-csv-import/212585/1 "2019-12-20T02:31:36Z")

</div>

Hi There,

Following, im trying to figure out, is there anyway that we can index null values for "Date" data type ?  
or is there anyway i can index values of NULL values without skipping the data row of CSV file,  
in this example data fields are closed\_on or due\_date

following is my csv file example,

 ![Annotation 2019-12-20 103821](https://us1.discourse-cdn.com/elastic/original/3X/7/5/75445f6d08401c18483054189b5ff02f850b4f3d.png)

Mapping data types and null value parameter,

 ![Annotation 2019-12-20 104721](https://us1.discourse-cdn.com/elastic/original/3X/5/a/5a2be29226183ceba5cf8f6cbc0677353f508d84.png)

error that i do get that field to parse,

 ![Annotation 2019-12-20 104810](https://us1.discourse-cdn.com/elastic/original/3X/b/9/b979ab8d5722527902c2b7a99b08e4a72974776e.png)

if there any suggestion would be helpful, thank you.

---

<div class="post-metadata">

### Author: ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)
#### Post date: [December 20, 2019, 5:22pm UTC](https://discuss.elastic.co/t/date-data-type-null-value-indexing-from-csv-import/212585/2 "2019-12-20T17:22:55Z")

</div>

Why not just have your CSV such that the field value is truly empty, and not the word "NULL"? For example, your first data row would be:

```auto
1,4,1,whatever,,1,1,"2019-04-03 11:45:11",

```

so just modify your CSV in a text editor and find/replace `NULL` with nothing (i.e. `%s/NULL//g` in vi)

---

<div class="post-metadata">

### Author: ![sadeshdrj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sadeshdrj/32/59324_2.png) [@sadeshdrj](https://discuss.elastic.co/u/sadeshdrj)
#### Post date: [January 8, 2020, 1:32am UTC](https://discuss.elastic.co/t/date-data-type-null-value-indexing-from-csv-import/212585/3 "2020-01-08T01:32:08Z")

</div>

@richcollier  
Yes, this worked,

Appreciate your help... 🙂

---

<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: [February 5, 2020, 1:32am UTC](https://discuss.elastic.co/t/date-data-type-null-value-indexing-from-csv-import/212585/4 "2020-02-05T01:32:18Z")

</div>

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