Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

BigQuery queries use time interval 1min rather than 1m for minute resolution #306

Closed
markschwarz opened this issue Jan 19, 2021 · 1 comment

Comments

@markschwarz
Copy link

To reproduce: Create a panel with $__timeGroup(hitTimestamp, 1m) for the grouping.

Expected: Queries with 1m $__interval draw at 1 minute intervals
Actual: Queries with 1m $interval are interpreted as 1 month (Source). Queries with 1min are interpreted as 1 minute.

Impact: This is prevents me from using $__interval very effectively, since it's common for the auto interval to be set to 1min.

Workaround: Force the min interval to 1h, so 1 minute is never encountered. This makes the data less useful, but way better than nothing!

@Sayrus
Copy link

Sayrus commented Apr 19, 2021

Had the issue issue when using timeGroup with $__interval. I think it's because the function used to get the interval replaces m by M:

if (strInterval === 'm') {

The macro helpers says that 5m is interpreted as 5 minutes so I think there is an issue there.
Quoting the value, as shown in the macro helpers, also breaks and lead to a zero value as interval.

Note that using auto instead works in my case.

ofir5300 added a commit that referenced this issue Aug 4, 2021
fix: minute (m) shift period is casted to month (M) (fixes #306, fixes #343)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants