Problem while reading date from ES index in hive

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]

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