I have the following datetime format built from python datetime like bellow.
datetime.datetime.today()
2018-04-29 12:20:36.975031
Im reading a csv dataset and trying to load it to an elasticsearch writer setting the writer field with the pythondate to a datatype 'date' but it always fail with following error
2018-04-30 16:35:25| 2.0| 0.0|ERROR |ELASTICSEARCH writer: {"took":0,"errors":true,"items":[{"index":{"_index":"imob","_type":"imov","_id":"pzIxF2MB3029rqSru8Tt","status":400,"error":{"type":"mapper_parsing_exception","reason":"failed to parse [date]","caused_by":{"type":"illegal_field_value_exception","reason":"Cannot parse \"0000/00/00 00:00:00.000\": Value 0 for monthOfYear must be in the range [1,12]"}}}}]}
Seems odd cause the date beeing sent is beeing checked with a logger just before the ES writer and the value is
2018-04-30 16:40:42| 1.7| 0.0|INFORM|Attribute(string) : `date' has value `2018-04-29 12:20:36.975031'
So how is it beeing converted to \"0000/00/00 00:00:00.000\" as the ES 400 code replys back ?
Also tried to convert this format any other formats but it looks like FME does not recognizes the python created format .
Anyone dribbled similar topic before ?
Regards
Best answer by jakemolnar
View original