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
{{ message }}
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.
I am using grafana and the bigquery-grafana plugin to graph data from a BigQuery partitioned table. I was unable to graph data using the timeshift macro. I found that the problem is in the query to fetched the shifted data, it is looking for data in the same partitions as the main query. Time range is This month.
Query builder
Query inspector, two queries as expected. The query for the current month:
SELECT
TIMESTAMP_SECONDS(DIV(UNIX_SECONDS(`t`), 86400) *86400),
count(`t`) AS total
FROM`..._*`WHERE`t` BETWEEN TIMESTAMP_MILLIS (1572566400000) AND TIMESTAMP_MILLIS (1575158399999)
AND _TABLE_SUFFIX BETWEEN '20191101'AND'20191130'GROUP BY1ORDER BY1LIMIT1440
The query for the previous month
SELECT
TIMESTAMP_SECONDS(DIV(UNIX_SECONDS(`t`), 86400) *86400),
count(`t`) AS total_shifted_1m
FROM`..._*`WHERE`t` BETWEEN TIMESTAMP_MILLIS (1569884400000) AND TIMESTAMP_MILLIS (1572479999999)
AND _TABLE_SUFFIX BETWEEN '20191101'AND'20191130'GROUP BY1ORDER BY1LIMIT1440
Expected Behavior
Automatically adjust the query's "_TABLE_SUFIX" part.
Actual Behavior
The timeshifted query looks for data in the same partitioned tables as the non shifted query.
Steps to Reproduce the Problem
Build query on partitioned tables using the timeshift macro.
Specifications
Version: 1.0.2
Platform: macOS Catalina 10.15.1
Grafana Version: v6.4.3
The text was updated successfully, but these errors were encountered:
Bug Report
I am using grafana and the bigquery-grafana plugin to graph data from a BigQuery partitioned table. I was unable to graph data using the timeshift macro. I found that the problem is in the query to fetched the shifted data, it is looking for data in the same partitions as the main query. Time range is This month.
Query builder
![timeshift](https://user-images.githubusercontent.com/25478582/68759975-b090b500-0608-11ea-98f9-641701f9557b.png)
Query inspector, two queries as expected. The query for the current month:
The query for the previous month
Expected Behavior
Automatically adjust the query's "_TABLE_SUFIX" part.
Actual Behavior
The timeshifted query looks for data in the same partitioned tables as the non shifted query.
Steps to Reproduce the Problem
Specifications
The text was updated successfully, but these errors were encountered: