I am trying to parse a date field from a jdbc input :
SELECT TO_CHAR(date_column, 'YYYY-MM-DD') || 'T' || TO_CHAR(date_column, 'HH24:MI:SS') || 'Z' as "my_date" FROM my_table
When I try to parse it in the filter so it can be used as @timestamp :
filter {
date {
match => [ "my_date", "yyyy-MM-dd HH:mm:ss" ]
target => "@timestamp"
}
}
I get the following error :
"Invalid format: \"2016-12-06 12:12:00\" is malformed at 12:12:00
The corresponding field mapping in Elasticsearch is :
"my_date_field" : { "type" : "date", "format" : "date_time_no_millis" }
Is the error due to the format I chose ?