-
Notifications
You must be signed in to change notification settings - Fork 77
_PARTITIONTIME for partitioned datasets not working correctly #321
Comments
In addition, it looks like the date/time that is inserted to compare to _PARTITIONTIME is in local time, while the field is in UTC. Comparison has an timezone offset which gives wrong query results. This is not corrected by checking the "Convert time filter to UTC". This behavior is the same for both tables partitioned with ingestion time (_PARTITIONTIME field) and also partitioned with a timedate column. The only tables that work for me are unpartitioned tables. |
is this project dead? this is a showstopper |
I wonder the same thing. No response whatsoever from doitintl. |
This project is live and kicking. |
Thanks Ofir. Does 2.0.2 happen to include fixes for the above? If you are going to look into those issues post-2.0.2 (ie. to be released in 2 .0.3) it would seem that the it will take a long time before they are available for use. Thank you! |
Hi @gkyriazis |
Unfortunately face exatly the same issue. |
don't mean to sound like a jerk...and this is free software (although I do pay for grafana cloud) so I understand and apologise for my unjust entitlement but this whole plugin has been broken for half a year now...should we all just move on? |
Hi @kyriazis, If I may I would like to suggest a workaround to allow you to query partitioned table as you wish for now.
This way - the query will result with data which its |
Thank you @ofir5300, yes, I've tried that in the past and it works, however that increases the cost, since there is more data fetched from GCP. |
@bacheson @kyriazis What would you suggest as a good solution, taking in consideration not only that issue but also best practicing time filtering partitioned tables (using Query Builder):
|
@ofir5300 , thank you for looking into this. The more I think about it the more complicated it becomes. :-) Forgive me, it's been a while since I've dealt with this, so I'm describing the logic of how I think it should work. Let's pick up the various cases:
Ideally, the query should fetch "just the right amount" of data to fill the graph. For a graph that is (say) 500 pixels wide, you wouldn't want to transfer a lot more data than 500 points, since data querie cost is proportional to the size of the returned data. Also, I want to bring again the first comment that I made, which has to do with timezones. _PARTITIONTIME was in UTC (while still filled with local time) while timestamp was in local time. Thank you! |
Hopefully solved! Please give new version a try and let me know what you think..
|
Sorry for the delay, but finally got back to this.. I installed the new plugin, and then navigating to Configuration->Data sources->Google BigQuery, I am welcomed by this error message:
Some simple configuration issue I presume? Thank you! |
@gkyriazis Are you using a browser different than Chrome? |
Yes, Safari on Mac (Safari 15.3 (17612.2.9.1.5) on MacOS Monterey 12.2) I just tried Chrome and it works |
FIx need to be made for Safari #393 |
Hmm, fix seems to be "downgrade to 2.0.2", which is not going to fix this issue. :-) BTW, when I said "it works" I meant that I can run the module. I haven't verified with PARTITIONTIME yet. Thanks! |
I mean a fix should be published from our side in order to solve Safari issues... Will let you know once done |
trying to see if queries work. I have a simple time series of data points stored in a big query table at a rate of 1 per minute. If I use a time interval of anything less than 12 hours, it works fine. If I use 12 hours or more, then I only get the first (older) portion of the data displayed, as shown in the attached picture. By looking at the queries and re-running them in the console, it looks like I'm getting the right data from bigquery. Funny thing is if I modify and refresh in the "Edit Panel" mode, then sometimes the query works correctly. Maybe an issue with sorting through the data during display? Thanks! |
Bug Report
the query sent to BigQuery contains both a timestamp range (that is being measured using TIMESTAMP_MILLIS), and a _PARTITIONTIME range that is used (presumbly) to limit the partitions the query should work on.
The _PARTITIONTIME range limits are the limits of the time range to be displayed. However, that may not be bracketing the labels for the partitions that we want to search.
For example, for a 3hr window centered today, I get a query that contains:
_PARTITIONTIME >= '2021-04-11 20:05:29' AND _PARTITIONTIME < '2021-04-11 23:05:29'
I have created my BigQuery table to do partitioning on a per-month basis. For the single partition that I have, it has an auto-created date of the beginning of the month, namely
2021-04-01 00:00:00
.Consequently, the query does not pick up this partition, and no results are returned
Expected Behavior
Choose a _PARTITIONTIME range that picks the correct partitions for the needed time range
Actual Behavior
the _PARTITIONTIME range uses the display range ignoring the characteristics of each paritition.
Steps to Reproduce the Problem
Specifications
The text was updated successfully, but these errors were encountered: