Logstash JDBC input : assigning timestamp column

Hi,

Using logstash-input-jdbc and logstash-output-elasticsearch plugins I am populating the data from mysql database to elastic search.

In the select query I have a column, which is of data type "datetime".

When the data is populated into elastic search I see the data type as string instead of timestamp.

I did go through the documentation, but couldn't find information about how to set the timestamp column. (If I remember correctly, with the jdbc river this data was populated as timestamp.)

For e.g. a configuration like below:
jdbcTimeField => 'TimeStamp' # The column in your result table that contains a timestamp

is there any alternative approach/configuration which I can use?

Regards,
Chandan

You need to create a specific mapping for the field in ES, take a look at https://www.elastic.co/guide/en/elasticsearch/guide/current/mapping-intro.html

Thanks for the reply Mark.

With a date filter, I am able to do the needful.