EsHadoopInvalidRequest: failed to parse timestamp [2016-03-21 11:41:21,204]


(Dar Varley) #1

I'm trying to save a DataFrame with a timestamp field but I'm hitting

org.elasticsearch.hadoop.rest.EsHadoopInvalidRequest: failed to parse timestamp [2016-03-21 11:41:21,204]
at org.elasticsearch.hadoop.rest.RestClient.checkResponse(RestClient.java:467)

My code
`
JavaEsSparkSQL.saveToEs(resultDataFrame, "event/state", ImmutableMap.of("es.mapping.timestamp", "timestamp", "es.mapping.id", "id"));

Is it possible to set a pre-defined mapping?
`


(Costin Leau) #2

You might want to check the reference documentation. For example the "Mapping and Types" chapter
though I recommend reading the whole thing.


(system) #3