xrmx opened a new issue #4830: time grains broken in sqlite URL: https://github.com/apache/incubator-superset/issues/4830 Make sure these boxes are checked before submitting your issue - thank you! - [x] I have checked the superset logs for python stacktraces and included it here as text if any - [ ] I have reproduced the issue with at least the latest released version of superset - [x] I have checked the issue tracker for the same issue and I haven't found one similar ### Superset version master from ~1 month ago 97afcd5809269e885a0dde349081802a427c5674 ### Expected results hour, week and month time grains work fine ### Actual results The result is that hour time grains display a broken chart, while week and month fallback to the day as time grain. Problem is that sqlite time grains use strftime and thus the `%` that gets escaped breaking the query: ``` SELECT DATETIME(STRFTIME('%%Y-%%m-%%dT%%H:00:00', ts)) AS __timestamp, SUM(prezzo) AS sum__prezzo FROM prova12 WHERE ts >= '2017-09-15 00:00:00.000000' AND ts <= '2018-04-15 12:14:41.000000' GROUP BY DATETIME(STRFTIME('%%Y-%%m-%%dT%%H:00:00', ts)) ORDER BY sum__prezzo DESC LIMIT 50000 OFFSET 0; ``` ### Steps to reproduce On a Time series line chart querying a sqlite database use hour, week or month as time grain.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services