-
Notifications
You must be signed in to change notification settings - Fork 1.4k
bigquery: failing to parse some BQ query parameter dates and datetimes #11875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
hey @ash-ddog, thanks for the report. This issue is actually similar to #6651, which at time was solved by #6653, but we might need to improve coverage with other datetime formats as you just found out. I'll evaluate here what we can do to improve parsing to solve the issue that you reported and will keep you posted as I open PRs to potentially fix the issue. |
@ash-ddog for the first case I managed to reproduce here. Can you confirm if for the second case, the data type is With
With
|
Work in progress PR with repro scenarios for the cases that were reported #11932. Still need confirmation on the second scenario, as I could not reproduce with |
Thanks for the responses @alvarowolfx and thanks for taking a look.
Ack, let me try to get more info and I will post back as soon as I can. 🙏 |
Looks like the error is occurring in
and as an example, |
Uh oh!
There was an error while loading. Please reload this page.
Client
cloud.google.com/go/bigquery v1.64.0
Environment
go 1.24.1
Code and Dependencies
Stack trace (this is specifically for dates, but probably same area for datetime)
Expected behavior
Can retrieve a job config via
job.Confg()
without errorActual behavior
job.Config()
returns an error when trying to parse a BQ query param value of typeDATE
/DATETIME
Additional context
Saw this older issue but has been closed and not exactly sure it's related: #6409
I see two classes of error
YYYY-M-D
but trying to be parsed asYYYY-MM-DD
(i.e.civil.ParseDate
)YYYY-MM-DD HH:MM:SS UTC
but trying to parse asYYYY-MM-DDTHH:MM:SS[.FFFFFFFFF]
(i.e.civil.ParseDateTime
)Also for context: These errors are occurring in GCP projects we query on behalf of our customers, so we don't actually have access to these projects to look at the details of these jobs (i.e. I do not/can not know how these jobs end up with the query parameter values).
Please let me know if I can provide additional info. Also happy to try to open a PR (but I would probably just stop using
civil.ParseDate
andcivil.ParseDateTime
).The text was updated successfully, but these errors were encountered: