# Problem while reading date from ES index in hive

**URL:** https://discuss.elastic.co/t/problem-while-reading-date-from-es-index-in-hive/187365
**Category:** Elasticsearch
**Created:** [June 25, 2019, 2:21pm UTC](https://discuss.elastic.co/t/problem-while-reading-date-from-es-index-in-hive/187365 "2019-06-25T14:21:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sudhithra](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@sudhithra](https://discuss.elastic.co/u/sudhithra)
#### Post date: [June 25, 2019, 2:21pm UTC](https://discuss.elastic.co/t/problem-while-reading-date-from-es-index-in-hive/187365/1 "2019-06-25T14:21:49Z")

</div>

Hi,

I face a problem while reading date fields in HIVE using ES connector. I use es.mapping/rich.date as false. But still i get a parsing error while selecting the field from the hive table

CREATE EXTERNAL TABLE al3(  
field1 string,  
datefield string)  
ROW FORMAT SERDE  
'org.elasticsearch.hadoop.hive.EsSerDe'  
STORED BY  
'org.elasticsearch.hadoop.hive.EsStorageHandler'  
WITH SERDEPROPERTIES (  
'serialization.format'='1')  
TBLPROPERTIES (  
'es.mapping.rich.date'='false',  
'es.batch.size.entries'='10000',  
'es.batch.write.refresh'='false',  
'es.batch.write.retry.count'='10000',  
'es.batch.write.retry.wait'='10s',  
'es.mapping.id'='field1',  
'es.mapping.names'='field1:field1,datefield:datefield',  
'es.mapping.routing'='field1')  
;

mapping:

```
      "field1" : {
        "type" : "string",
        "store" : true
      },
      "datefield" : {
        "type" : "date",
        "store" : true,
        "format" : "yyyy-MM-dd HH:mm:ss"
      }

```

error message:  
Failed with exception java.io.IOException:org.elasticsearch.hadoop.rest.EsHadoopParsingException: Cannot parse value [2019-01-22 03:36:14] for field [datefield]

---

<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: [July 23, 2019, 2:21pm UTC](https://discuss.elastic.co/t/problem-while-reading-date-from-es-index-in-hive/187365/2 "2019-07-23T14:21:59Z")

</div>

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