GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: accepts a table ID, which downloads the table without a query by tswast · Pull Request #443 · googleapis/python-bigquery-pandas

This repository was archived by the owner on Sep 2, 2026. It is now read-only.

Conversation

@tswast

@tswast tswast commented Dec 6, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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 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 #266 🦕

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tswast
feat: accepts a table ID, which downloads the table without a query
9a9d3fd
@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the googleapis/python-bigquery-pandas API. label Dec 6, 2021
tswast added 6 commits December 6, 2021 17:12
@tswast
add todo for next steps
6adf233
@tswast
Merge remote-tracking branch 'upstream/main' into issue266-read_gbq-n…
73a791a
…o-query
@tswast
add unit test for table ID read_gbq
9b1eb0d
@tswast
add helper for is_query
ec9ddaf
@tswast
implement read_gbq with table id
9cc7c74
@tswast
fix remaining tests, don't localalize out-of-bounds timestamp columns
dd51ad8
@tswast
tswast marked this pull request as ready for review December 10, 2021 21:50
@tswast
tswast requested review from a team, loferris and plamut December 10, 2021 21:50
tswast
tswast commented Dec 10, 2021
View reviewed changes
Comment thread pandas_gbq/gbq.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@tswast
Update pandas_gbq/gbq.py
e1ad679
tswast
tswast commented Dec 10, 2021
View reviewed changes
Comment thread tests/unit/test_gbq.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

tswast added 6 commits December 10, 2021 16:30
@tswast
fix 3.7 unit tests
d29bc2a
@tswast
correct coverage
cb8f24f
@tswast
skip coverage for optional test skip
56b73b2
@tswast
fix docs build
8a61e97
@tswast
improve test coverage for error case
3f7900b
@tswast
as of google-cloud-bigquery 1.11.0, get_table before list_rows is unn…
3c53f1f
…ecessary
plamut
plamut reviewed Dec 15, 2021
View reviewed changes

@plamut plamut left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, with just a few nits.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread noxfile.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread pandas_gbq/gbq.py Outdated
Comment on lines +382 to +384
def download_table(
self, table_id, max_results=None, progress_bar_type=None, dtypes=None
):

@plamut plamut Dec 15, 2021

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit) Maybe completely annotate new methods?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@tswast tswast Dec 20, 2021

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, done.

I probably could have used Dict[str, Any] like we did here for dtypes, but maybe something more specific would be better?

Note: we aren't currently running any sort of type checking in this repo. There's an open issue for it here: https://github.com/googleapis/python-bigquery-pandas/issues/325

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@plamut plamut Dec 22, 2021

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a start, Dict[str, any] is probably just fine, especially if type checks are not implemented yet. Let's just make sure it's consistent with the docstring, the latter currently says Optional[Map[str, Union[str, pandas.Series.dtype]]].

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tests/unit/test_gbq.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

tswast added 2 commits December 20, 2021 13:42
@tswast
tests with whitespace
5ce125f
@tswast
type annotations
ea660f4
@tswast
tswast requested a review from plamut December 20, 2021 19:57
@tswast
improve coverage in owlbot config
6704991
@tswast tswast added the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 20, 2021
@gcf-owl-bot gcf-owl-bot Bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Dec 20, 2021
@gcf-owl-bot
🦉 Updates from OwlBot
9a1ca16
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
@tswast tswast mentioned this pull request Dec 21, 2021
test: improve to_gbq logic unit test coverage #449
Merged
4 tasks
@tswast
boost coverage
a9075df
plamut
plamut approved these changes Dec 22, 2021
View reviewed changes

@plamut plamut left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

The two comments are non-blocking.
(making the annotation consistent with the docstring and excluding the TYPE_CHECKING imports from coverage)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pandas_gbq/gbq.py Outdated
Comment on lines +18 to +19
if typing.TYPE_CHECKING:
import pandas

@plamut plamut Dec 22, 2021

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will never be executed during the tests (TYPE_CHECKING is False at runtime), thus at some point coverage will complain. Let's add a # pragma: NO COVER comment to ignore this block.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
tswast added 3 commits December 22, 2021 11:15
@tswast
Merge branch 'issue266-read_gbq-no-query' of github.com:tswast/python…
b3061b6
…-bigquery-pandas into issue266-read_gbq-no-query
@tswast
Revert "boost coverage"
ed3f9d9
This reverts commit a9075df.
@tswast
don't cover type checking only code, more generic type annotation
b9b017c
@tswast tswast added the automerge Merge the pull request once unit tests and other checks pass. label Dec 22, 2021
@tswast

tswast commented Dec 22, 2021

Copy link
Copy Markdown
Contributor Author

Thanks for the review @plamut!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gcf-merge-on-green
gcf-merge-on-green Bot merged commit bf0e863 into googleapis:main Dec 22, 2021
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Dec 22, 2021
@tswast
tswast deleted the issue266-read_gbq-no-query branch December 22, 2021 19:30
@release-please release-please Bot mentioned this pull request Jan 11, 2022
chore(main): release 1.0.0 #461
Closed
@release-please release-please Bot mentioned this pull request Jan 19, 2022
chore(main): release 0.17.0 #472
Merged
gcf-merge-on-green Bot pushed a commit that referenced this pull request Jan 19, 2022
@release-please
chore(main): release 0.17.0 (#472)
d453974
🤖 I have created a release *beep* *boop*
---


## [0.17.0](v0.16.0...v0.17.0) (2022-01-19)


### ⚠ BREAKING CHANGES

* use nullable Int64 and boolean dtypes if available (#445)

### Features

* accepts a table ID, which downloads the table without a query ([#443](#443)) ([bf0e863](bf0e863))
* use nullable Int64 and boolean dtypes if available ([#445](#445)) ([89078f8](89078f8))


### Bug Fixes

* `read_gbq` supports extreme DATETIME values such as `0001-01-01 00:00:00` ([#444](#444)) ([d120f8f](d120f8f))
* `to_gbq` allows strings for DATE and floats for NUMERIC with `api_method="load_parquet"` ([#423](#423)) ([2180836](2180836))
* allow extreme DATE values such as `datetime.date(1, 1, 1)` in `load_gbq` ([#442](#442)) ([e13abaf](e13abaf))
* avoid iteritems deprecation in pandas prerelease ([#469](#469)) ([7379cdc](7379cdc))
* use data project for destination in `to_gbq` ([#455](#455)) ([891a00c](891a00c))


### Miscellaneous Chores

* release 0.17.0 ([#470](#470)) ([29ac8c3](29ac8c3))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
parthea pushed a commit to googleapis/google-cloud-python that referenced this pull request Sep 18, 2025
@release-please
chore(main): release 0.17.0 (#472)
8a5066c
🤖 I have created a release *beep* *boop*
---


## [0.17.0](googleapis/python-bigquery-pandas@v0.16.0...v0.17.0) (2022-01-19)


### ⚠ BREAKING CHANGES

* use nullable Int64 and boolean dtypes if available (#445)

### Features

* accepts a table ID, which downloads the table without a query ([#443](googleapis/python-bigquery-pandas#443)) ([bf0e863](googleapis/python-bigquery-pandas@bf0e863))
* use nullable Int64 and boolean dtypes if available ([#445](googleapis/python-bigquery-pandas#445)) ([89078f8](googleapis/python-bigquery-pandas@89078f8))


### Bug Fixes

* `read_gbq` supports extreme DATETIME values such as `0001-01-01 00:00:00` ([#444](googleapis/python-bigquery-pandas#444)) ([d120f8f](googleapis/python-bigquery-pandas@d120f8f))
* `to_gbq` allows strings for DATE and floats for NUMERIC with `api_method="load_parquet"` ([#423](googleapis/python-bigquery-pandas#423)) ([2180836](googleapis/python-bigquery-pandas@2180836))
* allow extreme DATE values such as `datetime.date(1, 1, 1)` in `load_gbq` ([#442](googleapis/python-bigquery-pandas#442)) ([e13abaf](googleapis/python-bigquery-pandas@e13abaf))
* avoid iteritems deprecation in pandas prerelease ([#469](googleapis/python-bigquery-pandas#469)) ([7379cdc](googleapis/python-bigquery-pandas@7379cdc))
* use data project for destination in `to_gbq` ([#455](googleapis/python-bigquery-pandas#455)) ([891a00c](googleapis/python-bigquery-pandas@891a00c))


### Miscellaneous Chores

* release 0.17.0 ([#470](googleapis/python-bigquery-pandas#470)) ([29ac8c3](googleapis/python-bigquery-pandas@29ac8c3))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
@blunderbuss-gcf blunderbuss-gcf Bot assigned sycai Sep 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@loferris loferris Awaiting requested review from loferris
1 more reviewer
@plamut plamut plamut approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@sycai sycai

Labels

api: bigquery Issues related to the googleapis/python-bigquery-pandas API.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

ENH: Read BigQuery query table without a query

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@tswast @plamut @sycai
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.