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: Feature/list tables page size by OmriBromberg · Pull Request #174 · googleapis/python-bigquery-sqlalchemy

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

Conversation

@OmriBromberg

@OmriBromberg OmriBromberg commented May 12, 2021 •
edited by jimfulton
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:

  • [V] 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
  • [V] Ensure the tests and linter pass
  • [V] Code coverage does not decrease (if any source code was changed)
  • [V] Appropriate docs were updated (if necessary)

Fixes #173 🦕

Hey guys, I explained in the issue a bit but I wanted to implement it so users would be able to change max_results @ dataset.list_tables like the arraysize parameter so I copied how it is treated in the parse_url area and updated the tests and docs for it, the new parameter for it is called list_tables_page_size

also I saw that on line 606
there is this expression self.arraysize = self.arraysize or arraysize which always takes the default arraysize instead of the parsed querystring arraysize because self.arraysize is always initialized to a default value, so I also reversed it to be as so self.arraysize = arraysize or self.arraysize, now the querystring arraysize will take precedence over the default value

Sorry, something went wrong.

Uh oh!

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

All reactions
@OmriBromberg
OmriBromberg requested a review from a team May 12, 2021 21:12
@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. label May 12, 2021
@google-cla

google-cla Bot commented May 12, 2021

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
  • It's possible we don't have your GitHub username or you're using a different email address on your commit. Check your existing CLA data and verify that your email is set on your git commits.
Corporate signers
  • Your company has a Point of Contact who decides which employees are authorized to participate. Ask your POC to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the Google project maintainer to go/cla#troubleshoot (Public version).
  • The email used to register you as an authorized contributor must be the email used for the Git commit. Check your existing CLA data and verify that your email is set on your git commits.
  • The email used to register you as an authorized contributor must also be attached to your GitHub account.

ℹ️ Googlers: Go here for more info.

All reactions

Sorry, something went wrong.

Uh oh!

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

@google-cla google-cla Bot added the cla: no This human has *not* signed the Contributor License Agreement. label May 12, 2021
@OmriBromberg

OmriBromberg commented May 12, 2021

Copy link
Copy Markdown
Contributor Author

@googlebot I signed it!

All reactions

Sorry, something went wrong.

Uh oh!

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

@google-cla google-cla Bot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels May 12, 2021
@OmriBromberg
OmriBromberg force-pushed the feature/list_tables_page_size branch from 5a97fa7 to 085df0f Compare May 12, 2021 21:28
@OmriBromberg
feat: allow max_results to be passed on to dataset.list_tables rest o…
5331bcd
…peration as list_tables_page_size

fix: arraysize default always takes priority over querystring
@OmriBromberg
OmriBromberg force-pushed the feature/list_tables_page_size branch from 085df0f to 5331bcd Compare May 12, 2021 21:31
Jim Fulton
Merge branch 'master' into feature/list_tables_page_size
940c4e5
@jimfulton jimfulton changed the title Feature/list tables page size feat: Feature/list tables page size May 14, 2021
@jimfulton jimfulton added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels May 16, 2021
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels May 16, 2021
@jimfulton
jimfulton self-requested a review May 16, 2021 20:32
jimfulton
jimfulton reviewed May 16, 2021
View reviewed changes

@jimfulton jimfulton left a comment

Copy link
Copy Markdown
Contributor

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 is a great start. In addition to adding a feature, you found two bugs!

This needs test of the logic that fetches lists of tables. A unit test would be fine and should be straightforward to write.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread pybigquery/sqlalchemy_bigquery.py Resolved

Uh oh!

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

Comment thread pybigquery/sqlalchemy_bigquery.py Resolved

Uh oh!

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

@OmriBromberg
test: test_arraysize_querystring_takes_precedence_over_default
107c18e
@OmriBromberg

OmriBromberg commented May 19, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

hey, regarding this can you explain this logic to me? why shouldn't it always take the "full_table_id" property? gives us inconsistencies

All reactions

Sorry, something went wrong.

Uh oh!

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

@jimfulton

jimfulton commented May 19, 2021

Copy link
Copy Markdown
Contributor

hey, regarding this can you explain this logic to me? why shouldn't it always take the "full_table_id" property? gives us inconsistencies

That's a good question.

If you look at: https://github.com/sqlalchemy/sqlalchemy/blob/b20b6f8fe7ea0198f819a0fd68ca076b6c760054/lib/sqlalchemy/testing/suite/test_reflection.py#L537-L579

SQLAlchemy expects the results to be unqualified, which we satisfy if we have a schema.

Looking at other dialects:

MS SQL requires a schema: https://github.com/sqlalchemy/sqlalchemy/blob/b20b6f8fe7ea0198f819a0fd68ca076b6c760054/lib/sqlalchemy/dialects/mssql/base.py#L2877

Oracle assumes there's a default: https://github.com/sqlalchemy/sqlalchemy/blob/b20b6f8fe7ea0198f819a0fd68ca076b6c760054/lib/sqlalchemy/dialects/oracle/base.py#L1759-L1760

as does Postgres: https://github.com/sqlalchemy/sqlalchemy/blob/b20b6f8fe7ea0198f819a0fd68ca076b6c760054/lib/sqlalchemy/dialects/postgresql/base.py#L3488-L3490

As does sqlite, sort of: https://github.com/sqlalchemy/sqlalchemy/blob/b20b6f8fe7ea0198f819a0fd68ca076b6c760054/lib/sqlalchemy/dialects/sqlite/base.py#L1977-L1981

and so on.

So BQ is a little different because there might not be a default.

Amongst the options:

  1. Error if no schema is provided and there's no default.
  2. Qualify the results if we don't have a schema. I prefer using just the data set id in this case. full_table_id adds clutter IMO.

Playing with this some more, you can list schemas in other projects by specifying project_id.schema_id (e.g. "bigquery-public-data.census_bureau_acs"). That makes the use of a colon in full_table_id a little weird.

OmriBromberg reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@jimfulton
jimfulton marked this pull request as draft May 24, 2021 20:21
OmriBromberg added 3 commits June 5, 2021 15:40
@OmriBromberg
feat: allow max_results to be passed on to dataset.list_tables rest o…
773e66c
…peration as list_tables_page_size

fix: arraysize default always takes priority over querystring
@OmriBromberg
test: test_arraysize_querystring_takes_precedence_over_default
ee9afe4
@OmriBromberg
Merge branch 'feature/list_tables_page_size' of https://github.com/Om…
9cd759b
…riBromberg/python-bigquery-sqlalchemy into feature/list_tables_page_size
@jimfulton

jimfulton commented Jun 8, 2021

Copy link
Copy Markdown
Contributor

The bigquery client now accepts a page_size parameter, so this PR wants to use that.

When your;re ready for me to review, please merge master to get rid of many spurious changes. :)

OmriBromberg reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

OmriBromberg added 3 commits June 28, 2021 18:05
@OmriBromberg
Merge branch 'master' into feature/list_tables_page_size
66097d6
@OmriBromberg
change max_results to page_size
d4ee350
@OmriBromberg
update dependencies versions in order to support page_size
b6632e3
@OmriBromberg
OmriBromberg marked this pull request as ready for review July 4, 2021 06:29
Jim Fulton
Merge branch 'master' into feature/list_tables_page_size
f04f3a2
@jimfulton jimfulton added kokoro:force-run Add this label to force Kokoro to re-run the tests. kokoro:run Add this label to force Kokoro to re-run the tests. labels Jul 6, 2021
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Jul 6, 2021
jimfulton
jimfulton approved these changes Jul 6, 2021
View reviewed changes
@jimfulton

jimfulton commented Jul 6, 2021

Copy link
Copy Markdown
Contributor

Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

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

@jimfulton
jimfulton merged commit e0f1496 into googleapis:master Jul 6, 2021
jimfulton pushed a commit to jimfulton/python-bigquery-sqlalchemy that referenced this pull request Jul 22, 2021
@OmriBromberg Jim Fulton
feat: Feature/list tables page size (googleapis#174)
e2cb5c5
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@jimfulton jimfulton jimfulton approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

No one assigned

Labels

api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

dataset.list_tables max_results parameter

Uh oh!

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

3 participants

@OmriBromberg @jimfulton @yoshi-kokoro
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.