You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using $__timeInterval and want to get a monthly summary (changeable to daily etc via drop-down variable). However because it's using a simple seconds since epoch calculation it comes out with grouping on 16/17 of month at present.
A $__timeIntervalStartOf type macro would be really useful that uses the toStartOfInterval function to produce the expected/correct result in this case.
The text was updated successfully, but these errors were encountered:
I want to avoid adding too many macros like this, especially when ClickHouse has functions built in for these types of time operations.
Can you show me an example of a query you would write with the macro vs without the macro? You should be able to use the other macros/variables to accomplish this, such as $__fromTime and $__toTime. This will give you a DateTime value that you can plug into the ClickHouse functions.
This sounds reasonable, however it is a real pain (if even possible) to convert the interval from grafana (either seconds or 1M format) into "interval 1 month". So perhaps a $__intervalSql type variable that does this?
I'm using $__timeInterval and want to get a monthly summary (changeable to daily etc via drop-down variable). However because it's using a simple seconds since epoch calculation it comes out with grouping on 16/17 of month at present.
A $__timeIntervalStartOf type macro would be really useful that uses the toStartOfInterval function to produce the expected/correct result in this case.
The text was updated successfully, but these errors were encountered: