Data missing time field

  • What Grafana version and what operating system are you using?
    Windows

  • What are you trying to achieve?
    Plot cnadlestick time series data

  • How are you trying to achieve it?
    Through clickhouse query

  • What happened?
    Getting “Data missing time field” error

  • What did you expect to happen?
    To see a candlestick chart, i can see table view and has time field

  • Can you copy/paste the configuration(s) that you are having problems with?

SELECT toUnixTimestamp(TimeBarStart) as time, FirstTradePrice, HighTradePrice, LowTradePrice, LastTradePrice, Volume FROM “algoseekTAQ”.“us_equity_1min_taq” WHERE ( time >= $__fromTime AND time <= $__toTime ) AND ( Ticker = ‘${Ticker}’ ) ORDER BY time ASC LIMIT 1000

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?
    No

welcome @svctradingbqm

Why are you doing the following

toUnixTimestamp(TimeBarStart) as time What data type is TimeBarStart

It’s datetime64 type in clickhouse database. Looks like below in table view

image

1 Like

what does it look like if you dont use that function but rather use convert field transformation and convert it to time

Hello,
Not quite sure what you mean. Without that function, raw data looks like below. Is the error due to time format issues or time column not being there? I do see ‘time’ column

time
2020-01-02 09:00:00
2020-01-02 09:01:00
2020-01-02 09:02:00
2020-01-02 09:03:00
2020-01-02 09:04:00
2020-01-02 09:05:00
2020-01-02 09:06:00
2020-01-02 09:07:00
2020-01-02 09:08:00
2020-01-02 09:09:00
2020-01-02 09:10:00
2020-01-02 09:11:00
2020-01-02 09:12:00
2020-01-02 09:13:00
2020-01-02 09:14:00
2020-01-02 09:15:00
2020-01-02 09:16:00
2020-01-02 09:17:00
2020-01-02 09:18:00
2020-01-02 09:19:00
2020-01-02 09:20:00
2020-01-02 09:21:00

time format. the datatype might be string date and grafana some versions have issues with that. so you can use transformation to convert to time

I took out toUnixTimestamp function and don’t see that error anymore. thank you

I’ve a different issue now. I am using candlestick to display this data. Numbers are float, however tool tip shows integers. Any idea how to fix? Thank you

same thing, use convert to convert to number maybe?