Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: list_tables, list_projects, list_datasets, list_models, list_routines, and list_jobs now accept a page_size parameter to control page size #686

Merged
merged 15 commits into from Jun 6, 2021
Merged
17 changes: 17 additions & 0 deletions google/cloud/bigquery/client.py
Expand Up @@ -311,6 +311,10 @@ def list_projects(
The number of seconds to wait for the underlying HTTP transport
before using ``retry``.

page_size (Optional[int]):
Maximum number of projects to return in each page, If not passed,
plamut marked this conversation as resolved.
Show resolved Hide resolved
defaults to a value set by the API.

Returns:
google.api_core.page_iterator.Iterator:
Iterator of :class:`~google.cloud.bigquery.client.Project`
Expand Down Expand Up @@ -378,6 +382,8 @@ def list_datasets(
timeout (Optional[float]):
The number of seconds to wait for the underlying HTTP transport
before using ``retry``.
page_size (Optional[int]):
Maximum number of datasets to return per page.

Returns:
google.api_core.page_iterator.Iterator:
Expand Down Expand Up @@ -1306,6 +1312,9 @@ def list_models(
timeout (Optional[float]):
The number of seconds to wait for the underlying HTTP transport
before using ``retry``.
page_size (Optional[int]):
Maximum number of models to return per page. If not
passed, defaults to a value set by the API.

Returns:
google.api_core.page_iterator.Iterator:
Expand Down Expand Up @@ -1380,6 +1389,9 @@ def list_routines(
timeout (Optional[float]):
The number of seconds to wait for the underlying HTTP transport
before using ``retry``.
page_size (Optional[int]):
Maximum number of routines to return per page. If not
passed, defaults to a value set by the API.

Returns:
google.api_core.page_iterator.Iterator:
Expand Down Expand Up @@ -1454,6 +1466,9 @@ def list_tables(
timeout (Optional[float]):
The number of seconds to wait for the underlying HTTP transport
before using ``retry``.
page_size (Optional[int]):
Maximum number of tables to return per page. If not
passed, defaults to a value set by the API.

Returns:
google.api_core.page_iterator.Iterator:
Expand Down Expand Up @@ -2168,6 +2183,8 @@ def list_jobs(
Max value for job creation time. If set, only jobs created
before or at this timestamp are returned. If the datetime has
no time zone assumes UTC time.
page_size (Optional[int]):
Maximum number of jobs to return per page.

Returns:
google.api_core.page_iterator.Iterator:
Expand Down