furyou81 edited a comment on issue #15034:
URL: https://github.com/apache/superset/issues/15034#issuecomment-857697952
so when using v1.2 I the time grain are there but I have an other issue.
I have a field called DATETIME. I noticed that when the request was done it
is using "DATETIME" and it fails as it is a reserved SQL word so I added a
calculated column which modifies it so `` `DATETIME` `` using ` instead of ".
And everything is working fine until I try to add a time range.
If I add a time range, it is adding an additiona "DATETIME" as bellow:
``SELECT date_format(`DATETIME`, 'yyyy-MM-dd 00:00:00.000') AS __timestamp,
COUNT(*) AS count
FROM "default"."xxx"
WHERE "DATETIME" >= '2021-05-31T00:00:00'
AND "DATETIME" < '2021-06-07T00:00:00'
AND `DATETIME` >= '2021-05-31T00:00:00'
AND `DATETIME` < '2021-06-07T00:00:00'
GROUP BY __timestamp
LIMIT 10000;``
I also tried to use an other field but it still tries to add "DATETIME".
`SELECT COUNT(*) AS count
FROM "default"."xxx"
WHERE "DATETIME" >= '2021-05-31T00:00:00'
AND "DATETIME" < '2021-06-07T00:00:00'
AND "TIMESTAMP" >= 1622419200
AND "TIMESTAMP" < 1623024000
ORDER BY count DESC
LIMIT 10000;`
I also tried to delete DATETIME from the dataset on Superset and then it
complains that the field DATETIME is not found event if I am not asking to use
it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]