Canvas Time Filter not using correct date format


(Frederik Werner) #1

Hi Guys,

This is my first post here :slight_smile: I am trying to get Canvas to work with my Timelion expression. I am using ES 6.4.2.

In Timelion, my query
.es(q=*, index=att*_touchpoints, timefield=fields.timestamp)
gives me a nice timeseries. I am using fields.timestamp as a custom timefield.

Using the same expression in Canvas seems to work fine. I am using a simple table like this:
timelion query=".es(q=*, index=att*_touchpoints, timefield=fields.timestamp)"
This gives me a nice table. Awesome! But now, I want to filter on a date with the time filter. So I define my custom time field there as well:
timefilterControl compact=true column="fields.timestamp"

But now, as I try to pass this filter to my datatable, things go wrong. If I use
filters | timelion query=".es(q=*, index=att*_touchpoints, timefield=fields.timestamp)"
I end up with an exclamation mark, telling me my request failed with status code 500. In ES, I see this error:
ElasticsearchParseException: failed to parse date field [2018-10-04T08:55:49.143Z] with format [epoch_second]

My mapping for the fields.timestamp field looks like this:
"timestamp": {
"type": "date",
"format": "epoch_second"
}

I am not sure if I'm missing something obvious here, but I just can't get this to work. This is a showstopper for me, as all my timestamps are in epoch_second format. Any help is highly appreciated!

Best regards,
Frederik


(kulkarni) #2

@Catherine_Liu - This is the ticket I mentioned about Canvas.

Thanks
Rashmi


(Frederik Werner) #3

Just another thing I tried out of desperation: When I use another index with a date format "epoch_second||date_time||strict_date_time", Elasticsearch still throws an exception but Canvas gets a result.


(system) #4

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