I have a similar query and it works. Which error are you getting? Is it that type LONG is not supported?
You are correct, Database type LONG not supported. looks like we are close to a resolution.
Sorry, my mistake. I thought the mapping for LONG/int was added but it was not. I have added it now and pushed to master so it should work in this build that I just published - build 4.3.0-7818beta1.
Getting better, now I get the following errors if I select the “time series” and the error below if I select the
table. I ran a query to see if I could find a row without a time value but everything seems to be fine.
First thing, as you want to use the data as Time Series data then you have to change the Format as field to Time series
. That is why the second example did not work.
In your data, do you have null values in the InsertDate for any rows? You could try adding InsertDate is not null
to your where clause.
I created a table that is a miniversion of yours:
CREATE TABLE history(InsertDate datetime, `value` int, `type` varchar(100));
INSERT INTO `history`
(`InsertDate`, `value`, `type`)
VALUES
(CURRENT_TIMESTAMP, 1, 'Humidity');
And here is my query:
Daniel,
thanks for not giving up on me. I included the statement is not null but I still get the “Found row with no time value”. I also run the same query in Mysql and there is no field with a null or blank in it.
I also noticed that when I select time series, I do not get the query statement as you do, I only have two options, time series and table. By the way, what is the difference between the two? By the way, I use your example and I created a new table, no error but no row returned either on the screen. Did you get any results when you ran yours?
SELECT
UNIX_TIMESTAMP(InsertDate) as time_sec,
value as value,
location2 as metric
FROM history
WHERE $__timeFilter(InsertDate) and location2 = ‘Temperature’ and insertdate is not NULL
ORDER BY InsertDate ASC
Hi Daniel,
I think I found the issue, please stand by. For some reason my datetime is different than yours, mine has leading 00000 at the end, not sure how this happen but I will try to remove them.
Daniel, you are the best, I changed the datetime type and it shows data now, Not sure about the data that I see yet but that may be a different issue.
Daniel, developers, this application rock, thanks for all your effort, hard work and a fantastic application, very much appreciated.