-
Notifications
You must be signed in to change notification settings - Fork 122
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
Out of bounds nanosecond timestamp: 1-01-01 00:00:00 #365
Comments
I'm not sure there's a reasonable way of handling this given the numpy type — how about uploading it as a string and then transforming in BQ? Though is that a permissible value in BQ, even if this library could upload it? |
@flakobatako What is the BigQuery data type of the column? e.g. DATE/DATETIME/TIMESTAMP? For TIMESTAMP columns, I believe this was fixed in |
Thought: Possible we can make this compatible with v2 if we duplicate some of the logic to detect out-of-bounds values and pass |
I can reproduce this in a test in #442
The good news is that it's fixed when I work with the |
…oad_gbq` (#442) Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-bigquery-pandas/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes #441 Towards #365 🦕
Good afternoon.
I have a table where there is a column named maxDate.
There are some rows (like 1%) that can have the following date: 0001-01-01T00:00:00.
The problem is that it lives in a GBQ from a external vendor to the company, so icannot modify the data and when i call th query like this:
df = pandas_gbq.read_gbq(
sql, credentials=credentials)
I have the error: File "pandas_libs\tslibs\np_datetime.pyx", line 117, in pandas._libs.tslibs.np_datetime.check_dts_bounds
pandas._libs.tslibs.np_datetime.OutOfBoundsDatetime: Out of bounds nanosecond timestamp: 1-01-01 00:00:00.
Is there a workaround or config so i can execute the query correctly?
Thank you in advance.
The text was updated successfully, but these errors were encountered: