Skip to content

refactor(bigquery): update code samples to use strings for table and dataset IDs - #9495

Merged
tswast merged 18 commits into
googleapis:masterfrom
MaxxleLLC:new-samples
Dec 2, 2019
Merged

refactor(bigquery): update code samples to use strings for table and dataset IDs#9495
tswast merged 18 commits into
googleapis:masterfrom
MaxxleLLC:new-samples

Conversation

@emar-kar

@emar-kar emar-kar commented Oct 18, 2019

Copy link
Copy Markdown
Contributor

Towards #8989
Closes #9499.

List of changes:

New samples:

  1. client_query_add_column;
  2. client_query_batch;
  3. client_query_destination_table;
  4. client_query_destination_table_cmek;
  5. client_query_destination_table_legacy;
  6. client_query_dry_run;
  7. client_query_legacy_sql;
  8. client_query_relax_column;
  9. copy_table_cmek;
  10. copy_table_multiple_source.

Comment lines in samples unified:

  1. client_query;
  2. copy_table;
  3. load_table_dataframe.

DEPRECATED tests

  1. test_create_routine;
  2. test_update_routine;
  3. test_get_routine;
  4. test_delete_routine;
  5. test_list_routines;
  6. test_create_routine_ddl

All those tests were united in the test_routine_samples file!

@emar-kar emar-kar added the api: bigquery Issues related to the BigQuery API. label Oct 18, 2019
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 18, 2019
@emar-kar emar-kar changed the title New samples refactor(bigquery): update code samples to use strings for table and dataset IDs Oct 18, 2019
@emar-kar
emar-kar requested a review from tswast October 18, 2019 11:01
@emar-kar
emar-kar marked this pull request as ready for review October 18, 2019 11:01
@emar-kar
emar-kar requested a review from a team October 18, 2019 11:01
@emar-kar emar-kar added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 18, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 18, 2019
@tswast tswast added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 18, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 18, 2019
Comment thread bigquery/samples/copy_table_multiple_source.py Outdated
Comment thread bigquery/samples/copy_table_multiple_source.py Outdated
Comment thread bigquery/samples/copy_table_cmek.py Outdated
Comment thread bigquery/samples/copy_table_cmek.py Outdated
Comment thread bigquery/samples/client_query_legacy_sql.py Outdated
Comment thread bigquery/samples/client_query_destination_table_cmek.py Outdated
Comment thread bigquery/samples/tests/test_client_query_dry_run.py Outdated
Comment thread bigquery/samples/tests/test_client_query_batch.py
Comment thread bigquery/samples/client_query_destination_table_cmek.py
Comment thread bigquery/samples/tests/test_client_query_dry_run.py Outdated
Comment thread bigquery/samples/tests/test_client_query_legacy_sql.py Outdated
Comment thread bigquery/docs/usage/queries.rst
emar-kar and others added 4 commits October 24, 2019 13:32
The parameter can sometimes confuse new BigQuery developers. Since
location autodetection now works pretty well, the parameter can be
removed from code samples for better clarity, except where the samples
want to explicitly demonstrate its usage.
@googlebot

Copy link
Copy Markdown

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Oct 25, 2019
@plamut

plamut commented Oct 25, 2019

Copy link
Copy Markdown
Contributor

@googlebot I consent.

@googlebot

Copy link
Copy Markdown

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot 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 Oct 25, 2019
Comment thread bigquery/samples/copy_table_cmek.py Outdated
Comment thread bigquery/samples/client_query_destination_table_legacy.py Outdated
Comment thread bigquery/samples/client_query_destination_table_legacy.py Outdated
Comment thread bigquery/samples/client_query_legacy_sql.py Outdated
Comment thread bigquery/samples/client_query_destination_table.py Outdated
Comment thread bigquery/samples/client_query_destination_table.py Outdated
Comment thread bigquery/samples/client_query_destination_table_cmek.py
Comment thread bigquery/samples/client_query_batch.py Outdated
Comment thread bigquery/samples/client_query_relax_column.py
@emar-kar emar-kar added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 8, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Nov 8, 2019
@tswast
tswast self-requested a review November 13, 2019 01:17

copy_table_multiple_source.copy_table_multiple_source(
client, random_table_id, table_ids
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's call dest_table = client.get_table(random_table_id) and then assert dest_table.num_rows > 0 so that we know that the job did what we expected it to do.

Comment thread bigquery/samples/tests/test_routine_samples.py


def test_get_routine(capsys, client, routine_id):
def test_client_query_destination_table_legacy(capsys, client, table_id):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Use random_table_id since we want to create a new table in the actual sample.

The table_id creates a table before the tests run.

table = client.create_table(table)

assert routine.body == "x * 4"
query_job = client_query_dry_run.client_query_dry_run(client)
out, err = capsys.readouterr()
assert "This query will process 0 bytes." not in out

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I got confused by this test.

I'd very much like to see a positive assertion that a non-zero number is present. not in could happen for many different reasons.

Suggested change
assert "This query will process 0 bytes." not in out
assert "This query will process" in out
assert query_job.total_bytes_processed > 0

@tswast
tswast self-requested a review December 2, 2019 15:34
@tswast
tswast merged commit 371c4f2 into googleapis:master Dec 2, 2019
@emar-kar
emar-kar deleted the new-samples branch December 3, 2019 08:04
parthea added a commit that referenced this pull request Sep 8, 2026
- **Add methods for Models API (#7562)**
- **Move table and dataset snippets to samples/ directory (#7683)**
- **Add sample demonstrating how to create a job. (#8422)**
- **Add Routines API. (#8491)**
- **Add `to_arrow` to get a `pyarrow.Table` from query results.
(#8609)**
- **BigQuery: deprecate `client.dataset()` part 1 (#9032)**
- **Optionally include indexes in table written by
`load_table_from_dataframe`. (#9084)**
- **docs(bigquery): standardize comments and formatting in existing code
samples (#9212)**
- **feat(bigquery): add support for sheets ranges (#9416)**
- **refactor(bigquery): update code samples to use strings for table and
dataset IDs (#9136)**
- **feat(bigquery): add Dataset.default_partition_expiration_ms and
Table.require_partition_filter properties (#9464)**
- **doc(bigquery): add code sample for scripting (#9537)**
- **chore(bigquery): format code with latest version of black (#9556)**
- **docs(bigquery): document how to achieve higher write limit and add
tests (#9574)**
- **doc(bigquery): add table create sample using integer range
partitioning (#9478)**
- **chore(bigquery): fix undelete table system test to use milliseconds
in snapshot decorator (#9649)**
- **refactor(bigquery): update code samples to use strings for table and
dataset IDs (#9495)**
- **docs(bigquery): add sample to read from query destination table
(#9964)**
- **feat(bigquery): add `create_bqstorage_client` param to
`to_dataframe` and `to_arrow` (#9573)**
- **refactor(bigquery): update code samples to use strings for table and
dataset IDs (#9974)**
- **cleanup(bigquery): remove unused query code sample (#10024)**
- **doc(bigquery): uncomment `Client` constructor and imports in samples
(#10058)**
- **fix(bigquery): write pandas `datetime[ns]` columns to BigQuery
TIMESTAMP columns (#10028)**
- **refactor(bigquery): update code samples of load table file and uri
(#10175)**
- **docs: use timeout in create dataset sample (#52)**
- **refactor(bigquery): update code samples of load table autodetect and
truncate (#28)**
- **Add veneer samples for BigQuery.
[(#444)](GoogleCloudPlatform/python-docs-samples#444
- **Add data loading samples**
- **Add bigquery snippets**
- **Remove unnecessary fixture**
- **Address review comments**
- **Fix lint**
- **Address post-review comments for BigQuery samples**
- **Add bigquery create and copy table examples
[(#514)](GoogleCloudPlatform/python-docs-samples#514
- **Auto-update dependencies.
[(#540)](GoogleCloudPlatform/python-docs-samples#540
- **Auto-update dependencies.
[(#542)](GoogleCloudPlatform/python-docs-samples#542
- **Move to google-cloud
[(#544)](GoogleCloudPlatform/python-docs-samples#544
- **Add new "quickstart" samples
[(#547)](GoogleCloudPlatform/python-docs-samples#547
- **BigQuery - use new QueryJob.results() method.
[(#555)](GoogleCloudPlatform/python-docs-samples#555
- **Quickstart tests
[(#569)](GoogleCloudPlatform/python-docs-samples#569
- **Generate readmes for most service samples
[(#599)](GoogleCloudPlatform/python-docs-samples#599
- **Generate most non-appengine readmes**
- **Add missing bigquery samples
[(#622)](GoogleCloudPlatform/python-docs-samples#622
- **Update samples to support latest Google Cloud Python
[(#656)](GoogleCloudPlatform/python-docs-samples#656
- **Update readmes**
- **Fix bigquery load from file sample**
- **Fix lint**
- **Adjusted error handling based on Googler feedback
[(#693)](GoogleCloudPlatform/python-docs-samples#693
- **Changed error handling for all other big query samples as well
[(#694)](GoogleCloudPlatform/python-docs-samples#694
- **Add bigquery shakespeare example
[(#604)](GoogleCloudPlatform/python-docs-samples#604
- **BigQuery parameterized query sample
[(#699)](GoogleCloudPlatform/python-docs-samples#699
- **Auto-update dependencies.
[(#715)](GoogleCloudPlatform/python-docs-samples#715
- **Remove cloud config fixture
[(#887)](GoogleCloudPlatform/python-docs-samples#887
- **Remove resource
[(#890)](GoogleCloudPlatform/python-docs-samples#890
- **BigQuery: named parameter query samples**
- **Rename query file and use async method.**
- **Indent queries.**
- **Auto-update dependencies.
[(#916)](GoogleCloudPlatform/python-docs-samples#916
- **Re-generate all readmes**
- **BigQuery: user credentials to run a query.
[(#925)](GoogleCloudPlatform/python-docs-samples#925
- **Auto-update dependencies.
[(#942)](GoogleCloudPlatform/python-docs-samples#942
- **Fix README rst links
[(#962)](GoogleCloudPlatform/python-docs-samples#962
- **Auto-update dependencies.
[(#1004)](GoogleCloudPlatform/python-docs-samples#1004
- **BigQuery: add auth samples for service accounts.**
- **Fix SQL query to return 10 rows & simplify
[(#1041)](GoogleCloudPlatform/python-docs-samples#1041
- **Fix test randomness
[(#1043)](GoogleCloudPlatform/python-docs-samples#1043
- **Fix test randomness
[(#1044)](GoogleCloudPlatform/python-docs-samples#1044
- **Auto-update dependencies.
[(#1055)](GoogleCloudPlatform/python-docs-samples#1055
- **Update readme references. Resolves 1059**
- **Use futures API to wait for jobs to finish.**
- **BQ: Use futures API for quickstart.**
- **BigQuery : max_results changes page size not full list size**
- **Remove max_results argument from table.fetch_data() call.**
- **Remove unnecessary list() call**
- **Auto-update dependencies.
[(#1093)](GoogleCloudPlatform/python-docs-samples#1093
- **BigQuery : add sample for writing query results to a destination
table.
[(#1101)](GoogleCloudPlatform/python-docs-samples#1101
- **Auto-update dependencies.
[(#1128)](GoogleCloudPlatform/python-docs-samples#1128
- **BigQuery: Updates samples for BigQuery Beta 2 (do not merge until
release)
[(#1178)](GoogleCloudPlatform/python-docs-samples#1178
- **Auto-update dependencies.
[(#1186)](GoogleCloudPlatform/python-docs-samples#1186
- **Auto-update dependencies.
[(#1227)](GoogleCloudPlatform/python-docs-samples#1227
- **/s/buckets/datasets in BigQuery auth sample
[(#1242)](GoogleCloudPlatform/python-docs-samples#1242
- **Fix broken link to core Client service account helper.
[(#1256)](GoogleCloudPlatform/python-docs-samples#1256
- **Added "Open in Cloud Shell" buttons to README files
[(#1254)](GoogleCloudPlatform/python-docs-samples#1254
- **Move imports into bigquery samples**
- **BigQuery: rewrite simple app tutorial.**
- **Auto-update dependencies.
[(#1272)](GoogleCloudPlatform/python-docs-samples#1272
- **Auto-update dependencies.
[(#1307)](GoogleCloudPlatform/python-docs-samples#1307
- **Auto-update dependencies.
[(#1355)](GoogleCloudPlatform/python-docs-samples#1355
- **Auto-update dependencies.
[(#1377)](GoogleCloudPlatform/python-docs-samples#1377
- **Regenerate the README files and fix the Open in Cloud Shell link for
some samples
[(#1441)](GoogleCloudPlatform/python-docs-samples#1441
- **BigQuery: Remove unused samples
[(#1455)](GoogleCloudPlatform/python-docs-samples#1455
- **BigQuery: Removes unused API samples
[(#1459)](GoogleCloudPlatform/python-docs-samples#1459
- **Update READMEs to fix numbering and add git clone
[(#1464)](GoogleCloudPlatform/python-docs-samples#1464
- **BigQuery: Moves BigQuery tutorial for Dataproc to
python-docs-samples
[(#1494)](GoogleCloudPlatform/python-docs-samples#1494
- **BigQuery: Adds authorized view tutorial
[(#1535)](GoogleCloudPlatform/python-docs-samples#1535
- **Region tag end typo
[(#1536)](GoogleCloudPlatform/python-docs-samples#1536
- **Code snippets for Jupyter data visualization tutorial
[(#1560)](GoogleCloudPlatform/python-docs-samples#1560
- **updates last query per Steve's feedback
[(#1578)](GoogleCloudPlatform/python-docs-samples#1578
- **updates tutorial to add datasets to to_delete before running
[(#1579)](GoogleCloudPlatform/python-docs-samples#1579
- **Remove ipython Python 2 modifier from requirements.txt
[(#1675)](GoogleCloudPlatform/python-docs-samples#1675
- **Auto-update dependencies.
[(#1846)](GoogleCloudPlatform/python-docs-samples#1846
- **Refactor BQ user credentials sample to use region tags
[(#1952)](GoogleCloudPlatform/python-docs-samples#1952
- **Make TODO clearer what action to take.
[(#1963)](GoogleCloudPlatform/python-docs-samples#1963
- **Add missing explanation about local_server callback URL**
- **Auto-update dependencies.
[(#1980)](GoogleCloudPlatform/python-docs-samples#1980
- **BigQuery: Add sample for explicitly creating client from service
acco…
[(#2312)](GoogleCloudPlatform/python-docs-samples#2312
- **Adds updates including compute
[(#2436)](GoogleCloudPlatform/python-docs-samples#2436
- **Simplify noxfile setup.
[(#2806)](GoogleCloudPlatform/python-docs-samples#2806
- **fix: address issues with concurrent BigQuery tests
[(#3426)](GoogleCloudPlatform/python-docs-samples#3426
- **chore(deps): update dependency pytz to v2019.3
[(#3190)](GoogleCloudPlatform/python-docs-samples#3190
- **chore(deps): update dependency matplotlib to v3.2.1
[(#3180)](GoogleCloudPlatform/python-docs-samples#3180
- **chore(deps): update dependency ipython to v7.13.0
[(#3177)](GoogleCloudPlatform/python-docs-samples#3177
- **chore(deps): update dependency google-cloud-bigquery to v1.24.0
[(#3049)](GoogleCloudPlatform/python-docs-samples#3049
- **chore(deps): update dependency pytz to v2020
[(#3566)](GoogleCloudPlatform/python-docs-samples#3566
- **chore(deps): update dependency ipython to v7.14.0
[(#3670)](GoogleCloudPlatform/python-docs-samples#3670
- **[bigquery] opt in to use the build specific projects
[(#3883)](GoogleCloudPlatform/python-docs-samples#3883
- **chore(deps): update dependency ipython to v7.15.0
[(#3917)](GoogleCloudPlatform/python-docs-samples#3917
- **Replace GCLOUD_PROJECT with GOOGLE_CLOUD_PROJECT.
[(#4022)](GoogleCloudPlatform/python-docs-samples#4022
- **Update dependency google-cloud-bigquery to v1.25.0
[(#4024)](GoogleCloudPlatform/python-docs-samples#4024
- **chore(deps): update dependency matplotlib to v3.2.2
[(#4118)](GoogleCloudPlatform/python-docs-samples#4118
- **Update dependency ipython to v7.16.1
[(#4189)](GoogleCloudPlatform/python-docs-samples#4189
- **chore(deps): update dependency pytest to v5.4.3
[(#4279)](GoogleCloudPlatform/python-docs-samples#4279
- **chore(deps): update dependency mock to v4
[(#4287)](GoogleCloudPlatform/python-docs-samples#4287
- **chore(deps): update dependency matplotlib to v3.3.0
[(#4310)](GoogleCloudPlatform/python-docs-samples#4310
- **chore: update templates**
- **chore: change project env variable to use in tests**
- **chore: fix samples tests dependencies**
- **chore(deps): update dependency google-cloud-bigquery to v1.26.1
(#180)**
- **chore(deps): pin ipython to v7.17.0 for samples, python >= 3.7
(#208)**
- **chore(deps): update dependency matplotlib to v3.3.1 (#224)**
- **docs: recommend insert_rows_json to avoid call to tables.get
(#258)**
- **fix: update minimum dependency versions (#263)**
- **chore: Prepare for 2.0 release (#278)**
- **chore(deps): update dependency google-cloud-bigquery to v2 (#287)**
- **docs(samples): add create_table_clustered code snippet (#291)**
- **docs: update snippets samples to support version 2.0 (#309)**
- **chore(deps): update dependency google-cloud-bigquery to v2.1.0
(#312)**
- **chore(deps): update dependency matplotlib to v3.3.2 (#260)**
- **chore(deps): update dependency grpcio to v1.33.1 (#338)**
- **chore(deps): update dependency google-auth-oauthlib to v0.4.2
(#349)**
- **chore(deps): update dependency grpcio to v1.33.2 (#350)**
- **chore(deps): update dependency google-cloud-bigquery-storage to
v2.0.1 (#337)**
- **chore(deps): update dependency google-cloud-bigquery to v2.2.0
(#333)**
- **chore(deps): update dependency pandas to v1.1.4 (#355)**
- **docs(samples): add more clustering code snippets (#330)**
- **chore(deps): update dependency matplotlib to v3.3.3 (#385)**
- **chore(deps): update dependency google-cloud-bigquery to v2.3.1
(#371)**
- **chore(deps): update dependency google-cloud-bigquery to v2.4.0
(#391)**
- **chore(deps): update dependency pyarrow to v2 (#380)**
- **chore(deps): update dependency pytz to v2020.4 (#356)**
- **feat: add support for materialized views (#408)**
- **chore(deps): update dependency grpcio to v1.34.0 (#411)**
- **chore(deps): update dependency google-cloud-bigquery to v2.5.0
(#410)**
- **docs: update intersphinx links (#404)**
- **chore(deps): update dependency google-cloud-bigquery to v2.6.0
(#419)**
- **chore(deps): update dependency google-cloud-bigquery-storage to
v2.1.0 (#369)**
- **chore(deps): update dependency pandas to v1.1.5 (#417)**
- **docs: add GEOGRAPHY data type code samples (#428)**
- **docs: fix Shapely import in GEOGRAPHY sample (#431)**
- **chore(deps): update dependency google-cloud-bigquery to v2.6.1
(#430)**
- **docs: move and refresh view samples (#420)**
- **chore(deps): update dependency pytz to v2020.5 (#452)**
- **chore(deps): update dependency pandas to v1.2.0 (#454)**
- **chore: remove six dependency (#461)**
- **chore(deps): update dependency google-cloud-bigquery to v2.6.2
(#466)**
- **chore(deps): update dependency grpcio to v1.34.1 (#470)**
- **chore(deps): update dependency grpcio to v1.35.0 (#477)**
- **chore(deps): update dependency google-cloud-bigquery-storage to
v2.2.1 (#485)**
- **chore(deps): update dependency pyarrow to v3 (#490)**
- **chore(deps): update dependency google-cloud-bigquery to v2.7.0
(#491)**
- **chore(deps): update dependency matplotlib to v3.3.4 (#495)**
- **chore: update shared templates (#468)**
- **chore(deps): update dependency pytz to v2021 (#502)**
- **test: add samples Python 3.9 test session (#506)**
- **docs(bigquery): Add alternative approach to setting credentials
(#517)**
- **chore(deps): update dependency google-cloud-bigquery to v2.9.0
(#515)**
- **chore(deps): update dependency google-cloud-bigquery-storage to
v2.3.0 (#529)**
- **chore(deps): update dependency google-cloud-bigquery to v2.10.0
(#535)**
- **chore(deps): update dependency grpcio to v1.36.0 (#536)**
- **chore(deps): update dependency grpcio to v1.36.1 (#541)**
- **chore(deps): update dependency google-auth-oauthlib to v0.4.3
(#542)**
- **chore(deps): update dependency google-cloud-bigquery to v2.11.0
(#546)**
- **chore(deps): update dependency google-cloud-bigquery to v2.12.0
(#554)**
- **chore(deps): update dependency google-cloud-bigquery to v2.13.0
(#570)**
- **chore(deps): update dependency google-auth-oauthlib to v0.4.4
(#578)**
- **chore(deps): update dependency matplotlib to v3.4.1 (#576)**
- **chore(deps): update dependency grpcio to v1.37.0 (#596)**
- **chore: add constraints file check for python samples (#601)**
- **chore(deps): update dependency mock to v4.0.3 (#605)**
- **docs: add sample to run DML query (#591)**
- **chore(deps): update dependency pytest to v6 (#606)**
- **chore(deps): update dependency google-cloud-bigquery to v2.13.1
(#573)**
- **feat: add type hints for public methods (#613)**
- **chore(deps): update dependency google-cloud-bigquery to v2.14.0
(#627)**
- **chore(deps): update dependency google-cloud-bigquery-storage to
v2.4.0 (#595)**
- **chore(deps): update dependency google-cloud-bigquery to v2.15.0
(#639)**
- **chore(deps): update dependency pyarrow to v4 (#641)**
- **chore(deps): update dependency grpcio to v1.37.1 (#640)**
- **chore(deps): update dependency pytest to v6.2.4 (#647)**
- **chore(deps): update dependency google-cloud-bigquery to v2.16.1
(#652)**
- **chore(deps): update dependency grpcio to v1.38.0 (#674)**
- **fix(tests): invalid path to strptime() (#672)**
- **chore(deps): update dependency google-cloud-bigquery to v2.17.0
(#675)**
- **chore: new owl bot post processor docker image (#677)**
- **chore(deps): update dependency pyarrow to v4.0.1 (#681)**
- **chore(deps): update dependency google-cloud-bigquery to v2.18.0
(#683)**
- **chore(deps): update dependency google-cloud-bigquery to v2.19.0
(#691)**
- **chore(deps): update dependency google-cloud-bigquery to v2.20.0
(#694)**
- **chore(deps): update dependency grpcio to v1.38.1 (#713)**
- **chore(deps): update dependency google-cloud-bigquery-storage to
v2.5.0 (#731)**
- **chore(deps): update dependency google-cloud-bigquery-storage to
v2.6.0 (#743)**
- **chore(deps): update dependency google-cloud-bigquery to v2.21.0
(#755)**
- **docs: add loading data from Firestore backup sample (#737)**
- **chore(deps): update dependency google-cloud-bigquery to v2.22.0
(#783)**
- **feat: add Samples section to CONTRIBUTING.rst (#785)**
- **docs: add sample to delete job metadata (#798)**
- **chore(deps): update dependency grpcio to v1.39.0 (#796)**
- **chore(deps): update dependency google-cloud-bigquery to v2.22.1
(#800)**
- **chore(deps): update dependency google-cloud-bigquery to v2.23.0
(#820)**
- **chore(deps): update dependency google-cloud-bigquery to v2.23.1
(#827)**
- **chore(deps): update dependency pyarrow to v5 (#834)**
- **chore(deps): update dependency google-cloud-bigquery-storage to
v2.6.2 (#795)**
- **chore(deps): update dependency google-auth-oauthlib to v0.4.5
(#839)**
- **chore(deps): update dependency google-cloud-bigquery to v2.23.2
(#838)**
- **chore(deps): update dependency google-cloud-testutils to v1 (#845)**
- **chore(deps): update dependency google-cloud-bigquery to v2.23.3
(#866)**
- **chore(deps): update dependency google-cloud-bigquery-storage to
v2.6.3 (#863)**
- **chore: fix INSTALL_LIBRARY_FROM_SOURCE in noxfile.py (#869)**
- **chore(deps): update dependency google-cloud-bigquery to v2.24.0
(#873)**
- **chore: drop mention of Python 2.7 from templates (#877)**
- **fix: remove pytz dependency and require pyarrow>=3.0.0 (#875)**
- **chore(deps): update dependency google-cloud-bigquery to v2.24.1
(#887)**
- **feat: Support using GeoPandas for GEOGRAPHY columns (#848)**
- **chore(deps): update dependency numpy to v1.21.2 (#899)**
- **chore(deps): update dependency google-cloud-core to v2 (#904)**
- **chore(deps): update dependency google-cloud-bigquery to v2.25.0
(#907)**
- **chore(deps): update dependency pandas to v1.3.2 (#900)**
- **docs: update docstring for bigquery_create_routine sample (#883)
(#917)**
- **chore(deps): update all dependencies (#914)**
- **chore(deps): update all dependencies (#926)**
- **chore(deps): update all dependencies (#928)**
- **chore(deps): update dependency google-cloud-bigquery to v2.26.0
(#938)**
- **chore: update system tests and samples to use and @google.com email
address (#942)**
- **test: fix routine DDL sample test exits too early (#932)**
- **chore(deps): update all dependencies (#939)**
- **chore(deps): update all dependencies (#943)**
- **docs: simplify destination table sample with f-strings (#966)**
- **chore(deps): update all dependencies (#963)**
- **chore(deps): update all dependencies (#992)**
- **chore: fail samples nox session if python version is missing
(#997)**
- **chore(deps): update all dependencies (#993)**
- **chore(python): Add kokoro configs for python 3.10 samples testing
(#1010)**
- **docs(samples): add create external table with hive partitioning
(#1033)**
- **docs: add code samples for Jupyter/IPython magics (#1013)**
- **chore: use gapic-generator-python 0.53.4 (#1037)**
- **feat: support Python 3.10 (#1043)**
- **docs: show gcloud command to authorize against sheets (#1045)**
- **docs: add sample for revoking dataset access (#778)**
- **chore: update python-docs-samples link to main branch (#1082)**
- **feat: support authorized dataset entity (#1075)**
- **chore(deps): update all dependencies (#1005)**
- **test: skip failing copy table tests (#1090)**
- **chore(deps): update all dependencies (#1089)**
- **chore(deps): update all dependencies (#1091)**
- **chore(deps): update all dependencies (#1098)**
- **chore(samples): Add check for tests in directory (#1103)**
- **chore(deps): update all dependencies (#1101)**
- **chore(python): Noxfile recognizes that tests can live in a folder
(#1115)**
- **docs: show common job properties in `get_job` and `cancel_job`
samples (#1137)**
- **chore(deps): update dependency ipython to v8.0.1 [security]
(#1126)**
- **chore(deps): update dependency ipython [security] (#1154)**
- **samples: remove browser option from user credentials sample
(#1147)**
- **deps: allow pyarrow 7.0 (#1112)**
- **chore: Adding support for pytest-xdist and pytest-parallel (#1160)**
- **chore(deps): update all dependencies (#1156)**
- **chore(deps): update all dependencies (#1162)**
- **chore(deps): update all dependencies (#1163)**
- **fix: upgrade black (#1177)**
- **fix!: remove out-of-date BigQuery ML protocol buffers (#1178)**
- **chore(deps): update all dependencies (#1164)**
- **chore(deps): update all dependencies (#1183)**
- **chore: use === in requirements.txt for environment specific pins
(#1184)**
- **chore(deps): update all dependencies (#1185)**
- **chore(deps): update all dependencies (#1192)**
- **chore(deps): update dependency click to v8.1.2 (#1197)**
- **chore(deps): update all dependencies (#1200)**
- **chore(deps): update dependency google-cloud-bigquery-storage to
v2.13.1 (#1203)**
- **chore(deps): update dependency google-auth to v2.6.3 (#1206)**
- **chore(deps): update dependency pyparsing to v3.0.8 (#1210)**
- **chore(deps): update dependency google-cloud-core to v2.3.0 (#1211)**
- **chore(deps): update dependency google-auth to v2.6.4 (#1214)**
- **chore(deps): update dependency google-api-core to v2.7.2 (#1215)**
- **fix: export bigquery.HivePartitioningOptions (#1217)**
- **chore(deps): update dependency google-auth to v2.6.5 (#1219)**
- **chore(deps): update dependency typing-extensions to v4.2.0 (#1221)**
- **chore(python): add nox session to sort python imports (#1224)**
- **chore(deps): update all dependencies (#1227)**
- **chore(deps): update dependency pytest to v7.1.2 (#1229)**
- **chore(deps): update dependency click to v8.1.3 (#1233)**
- **chore(deps): update dependency ipython to v8.3.0 (#1234)**
- **chore(deps): update dependency google-api-core to v2.7.3 (#1236)**
- **chore(deps): update dependency matplotlib to v3.5.2 (#1237)**
- **chore(deps): update all dependencies (#1238)**
- **docs: updated variable typo in comment in code sample (#1239)**
- **chore: update all dependencies (#1244)**
- **chore(deps): update dependency pyparsing to v3.0.9 (#1246)**
- **chore(deps): update dependency libcst to v0.4.3 (#1247)**
- **chore(deps): update dependency grpcio to v1.46.1 (#1249)**
- **chore(deps): update dependency googleapis-common-protos to v1.56.1
(#1251)**
- **chore(deps): update all dependencies (#1253)**
- **chore(deps): update all dependencies (#1255)**
- **feat: add support for table clones (#1235)**
- **chore(deps): update all dependencies (#1258)**
- **chore(deps): update all dependencies (#1264)**
- **docs(samples): add table snapshot sample (#1274)**
- **fix: require python 3.7+ (#1284)**
- **docs(samples): explicitly add bq to samples reqs, upgrade grpc to
fix bug on m1 (#1290)**
- **chore(deps): update all dependencies (#1301)**
- **chore(deps): update all dependencies (#1305)**
- **chore(deps): update all dependencies (#1308)**
- **chore(deps): update all dependencies (#1313)**
- **chore(deps): update dependency pytz to v2022.2.1 (#1316)**
- **chore(deps): update dependency google-cloud-bigquery-storage to
v2.14.2 (#1317)**
- **chore(deps): update dependency shapely to v1.8.3 (#1320)**
- **chore(deps): update all dependencies (#1322)**
- **chore(deps): update all dependencies (#1323)**
- **chore(deps): update dependency proto-plus to v1.22.1 (#1330)**
- **chore(deps): update dependency pandas to v1.4.4 (#1332)**
- **chore(deps): update dependency google-crc32c to v1.5.0 (#1334)**
- **fix: uses function (create_job) more appropriate to the described
sample intent (#1309)**
- **chore(deps): update all dependencies (#1339)**
- **chore(deps): update dependency google-cloud-bigquery-storage to
v2.15.0 (#1342)**
- **chore(deps): update dependency certifi to v2022.6.15.1 (#1346)**
- **chore: detect samples tests in nested directories (#1349)**
- **chore(deps): update all dependencies (#1351)**
- **chore(deps): update dependency google-api-core to v2.10.1 (#1353)**
- **chore(deps): update all dependencies (#1354)**
- **chore(deps): update all dependencies (#1358)**
- **chore(deps): update all dependencies (#1360)**
- **chore(deps): update dependency db-dtypes to v1.0.4 (#1361)**
- **chore(deps): update all dependencies (#1363)**
- **chore(deps): update all dependencies (#1380)**
- **feat: reconfigure tqdm progress bar in %%bigquery magic (#1355)**
- **chore(deps): update all dependencies (#1382)**
- **fix: corrects test for non-existent attribute (#1395)**
- **chore(python): drop flake8-import-order in samples noxfile (#1424)**
- **docs: created samples for load table and create table from schema
file (#1436)**
- **docs: create sample to write schema file from table (#1439)**
- **docs: revise sample for nested schema (#1446)**
- **chore: install all sample dependencies when type checking samples
(#1455)**
- **docs: revise label table code samples (#1451)**
- **docs: revise create table cmek sample (#1452)**
- **chore(python): add support for python 3.11 [autoapprove] (#1454)**
- **chore(deps): update dependency certifi to v2022.12.7 [security]
(#1434)**
- **chore(deps): update all dependencies (#1390)**
- **chore(deps): update all dependencies (#1456)**
- **chore(deps): update all dependencies (#1460)**
- **chore(deps): update all dependencies (#1461)**
- **docs: revise get table labels code sample, add TODO to clean up
snipp… (#1464)**
- **chore(deps): update dependency packaging to v23 (#1462)**
- **docs: revise delete label table code sample, add TODO to clean up
sni… (#1466)**
- **docs: adds snippet for creating table with external data config
(#1420)**
- **chore(deps): update all dependencies (#1471)**
- **chore(deps): update all dependencies (#1475)**
- **docs(samples): table variable fix (#1287)**
- **chore(deps): update dependency google-cloud-bigquery-storage to
v2.18.1 (#1476)**
- **chore(deps): update dependency geojson to v3 (#1478)**
- **chore(deps): update all dependencies (#1479)**
- **chore(deps): update dependency shapely to v2.0.1 (#1480)**
- **chore(deps): update dependency fiona to v1.9.0 (#1482)**
- **chore(deps): update dependency google-cloud-bigquery to v3.5.0
(#1485)**
- **chore(deps): update all dependencies to v1 (#1486)**
- **chore(deps): update all dependencies (#1501)**
- **chore(deps): update all dependencies (#1513)**
- **chore(deps): update all dependencies (#1514)**
- **chore(deps): update dependency charset-normalizer to v3.1.0
(#1518)**
- **chore(deps): update all dependencies (#1522)**
- **chore(deps): update all dependencies (#1540)**
- **chore(deps): update all dependencies (#1549)**
- **chore(deps): update dependency google-cloud-bigquery to v3.10.0
(#1556)**
- **chore(deps): update all dependencies (#1557)**
- **chore(deps): update dependency requests to v2.31.0 [security]
(#1573)**
- **chore(deps): update all dependencies (#1560)**
- **chore(deps): update all dependencies (#1576)**
- **chore(deps): update all dependencies (#1577)**
- **chore(deps): update all dependencies (#1606)**
- **test: enable copy table tests (#1609)**
- **chore(deps): update all dependencies (#1607)**
- **chore(deps): bump certifi in /samples/geography (#1627)**
- **chore(deps): update all dependencies (#1626)**
- **chore(deps): update all dependencies (#1636)**
- **chore(docs): update region tag and move sample and test (#1648)**
- **docs: Revise update_table_expiration sample (#1457)**
- **docs: revised `create_partitioned_table` sample (#1447)**
- **docs: revised relax column mode sample (#1467)**
- **chore: [autoapprove] Update `black` and `isort` to latest versions
(#1678)**
- **chore: upgrade mypy (#1705)**
- **chore(deps): bump urllib3 from 1.26.15 to 1.26.18 in
/samples/geography (#1684)**
- **chore(deps): update dependency pyarrow to v14 [security] (#1718)**
- **chore: standardize samples directory (#1727)**
- **chore: standardize samples directory - delete unneeded dependencies
(#1732)**
- **feat: Add support for Python 3.12 (#1736)**
- **feat: add `Client.query_and_wait` which directly returns a
`RowIterator` of results (#1722)**
- **chore: cleanup resources at startup (#1741)**
- **docs: update multiple samples to change query to query_and_wait
(#1784)**
- **docs: update the query with no cache sample to use query_and_wait
API (#1770)**
- **docs: remove unused query code sample (#1769)**
- **docs: Updates `query` to `query and wait` in
samples/desktopapp/user_credentials.py (#1787)**
- **docs: update `client_query_destination_table.py` sample to use
`query_and_wait` (#1783)**
- **docs: update to use `query_and_wait` in
`client_query_w_positional_params.py` (#1786)**
- **Docs: update the query destination table legacy file to use
query_and_wait API (#1775)**
- **docs: update sample for query_to_arrow to use query_and_wait API
(#1776)**
- **docs: update query_external_sheets_permanent_table.py to use
query_and_wait API (#1778)**
- **docs: update  to use  API (#1781)**
- **docs: update to use `query_and_wait` in
`samples/client_query_w_timestamp_params.py` (#1785)**
- **docs: update to_geodataframe to use query_and_wait functionality
(#1800)**
- **docs: update `client_query_w_named_params.py` to use
`query_and_wait` API (#1782)**
- **docs(samples): updates to urllib3 constraint for Python 3.7
(#1834)**
- **chore(deps): update all dependencies (#1640)**
- **chore: use mock from unittest (#1823)**
- **chore(deps): update all dependencies (#1835)**
- **chore(deps): update all dependencies (#1849)**
- **chore(deps): update dependency pyarrow to v15.0.2 (#1861)**
- **fix: update error logging when converting to pyarrow column fails
(#1836)**
- **chore(deps): update dependency google-auth to v2.29.0 (#1865)**
- **chore(deps): update dependency google-api-core to v2.18.0 (#1866)**
- **feat: add `fields` parameter to `set_iam_policy` for consistency
with update methods (#1872)**
- **chore(deps): update all dependencies (#1873)**
- **fix: make `pyarrow` an optional dependency post-3.20.0 yanked
release (#1879)**
- **chore(deps): update all dependencies (#1875)**
- **chore(deps): update all dependencies (#1882)**
- **chore(deps): update all dependencies (#1891)**
- **chore(deps): update dependency idna to v3.7 [security] (#1896)**
- **chore(deps): update all dependencies (#1893)**
- **chore(deps): update all dependencies (#1904)**
- **chore(deps): update all dependencies (#1916)**
- **chore(deps): update all dependencies (#1921)**
- **chore(deps): update all dependencies (#1926)**
- **chore(deps): update all dependencies (#1934)**
- **chore(deps): bump requests from 2.31.0 to 2.32.2 in
/samples/geography (#1933)**
- **chore(deps): update all dependencies (#1938)**
- **testing: update BQML training option (#1943)**
- **chore(deps): update all dependencies (#1946)**
- **chore(deps): update all dependencies (#1954)**
- **chore(deps): update dependency urllib3 to v2.2.2 [security]
(#1959)**
- **chore(deps): update all dependencies (#1955)**
- **chore(deps): update dependency certifi to v2024.7.4 [security]
(#1968)**
- **feat: use `bigquery-magics` package for the `%%bigquery` magic
(#1965)**
- **docs: add short mode query sample & test (#1978)**
- **chore(deps): update all dependencies (#1982)**
- **chore(deps): update all dependencies (#1983)**
- **chore(deps): update all dependencies (#1993)**
- **chore(deps): update all dependencies (#2002)**
- **chore(deps): update all dependencies (#2004)**
- **testing: remove testing identity override (#2011)**
- **chore(deps): update all dependencies (#2005)**
- **chore(deps): update all dependencies (#2017)**
- **chore(deps): update all dependencies (#2018)**
- **chore(deps): update all dependencies (#2025)**
- **chore(deps): update all dependencies (#2029)**
- **chore(deps): bump fiona from 1.9.6 to 1.10.0 in /samples/geography
(#2027)**
- **chore(deps): update all dependencies (#2031)**
- **chore(deps): update all dependencies (#2033)**
- **build: use multiScm for Kokoro release builds (#2049)**
- **chore(deps): update all dependencies (#2038)**
- **chore(deps): update all dependencies (#2064)**
- **chore(deps): update all dependencies (#2068)**
- **chore(deps): update all dependencies (#2070)**
- **chore(deps): update all dependencies (#2078)**
- **chore(deps): update all dependencies (#2096)**
- **chore(deps): update dependency grpcio to v1.69.0 (#2102)**
- **test: add unit test covering the case where worker streams are
stopped early (#2127)**
- **deps: Remove Python 3.7 and 3.8 as supported runtimes (#2133)**
- **chore(deps): update all dependencies (#2143)**
- **chore(deps): update dependency pyasn1-modules to v0.4.2 (#2150)**
- **chore(deps): update dependency shapely to v2.1.0 (#2155)**
- **chore(deps): update dependency typing-extensions to v4.13.1
(#2156)**
- **test: adds pytest-xdist to speed up processing of CI/CD checks
(#2153)**
- **chore(deps): update all dependencies (#2158)**
- **chore(deps): update dependency db-dtypes to v1.4.3 (#2178)**
- **chore(deps): update all dependencies to v3.32.0 (#2179)**
- **fix(deps): update all dependencies (#2184)**
- **chore(deps): update dependency google-auth to v2.40.2 (#2196)**
- **docs: use query_and_wait in the array parameters sample (#2202)**
- **feat: job creation mode GA (#2190)**
- **chore(deps): update dependency pytest-xdist to v3.7.0 (#2203)**
- **chore(deps): update all dependencies (#2205)**
- **chore(deps): update all dependencies (#2209)**
- **chore(deps): update all dependencies (#2211)**
- **chore(deps): update dependency requests to v2.32.4 (#2213)**
- **chore(deps): update dependency google-api-core to v2.25.1 (#2215)**
- **chore(deps): bump urllib3 from 2.4.0 to 2.5.0 in /samples/geography
(#2220)**
- **chore: add label job sample (#2219)**
- **chore(deps): update all dependencies (#2216)**
- **chore(deps): update all dependencies (#2224)**
- **chore(deps): update all dependencies (#2226)**
- **chore(deps): update dependency certifi to v2025.7.9 (#2232)**
- **chore(deps): update dependency certifi to v2025.7.14 (#2237)**
- **chore(deps): update all dependencies to v3.35.0 (#2242)**
- **chore(deps): update all dependencies (#2243)**
- **chore(deps): update dependency matplotlib to v3.10.5 (#2251)**
- **chore(deps): update all dependencies (#2253)**
- **chore(deps): update all dependencies (#2259)**
- **chore(deps): update all dependencies (#2275)**
- **chore(deps): update all dependencies (#2300)**
- **chore(deps): update dependency google-auth to v2.41.1 (#2312)**
- **chore(deps): update all dependencies (#2314)**
- **chore(python): Add Python 3.14 to python post processor image
(#2317)**
- **chore(deps): update dependency urllib3 to v2.6.0 [security]
(#2342)**
- **chore(deps): update dependency urllib3 to v2.6.3 [security]
(#2357)**
- **chore(deps): update dependency geopandas to v1.1.2 [security]
(#2411)**
- **chore(deps): update dependency pyasn1 to v0.6.2 [security] (#2407)**

Fixes https://github.com/googleapis/google-cloud-python/issues/18150

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: WhiteSource Renovate <bot@renovateapp.com>
Co-authored-by: Tim Swast <swast@google.com>
Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
Co-authored-by: Steffany Brown <30247553+steffnay@users.noreply.github.com>
Co-authored-by: john li <jli@circularly.org>
Co-authored-by: meredithslota <meredithslota@google.com>
Co-authored-by: Alma Becerril Salas <47731219+abecerrilsalas@users.noreply.github.com>
Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com>
Co-authored-by: Chalmer Lowe <chalmer.lowe@gmail.com>
Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com>
Co-authored-by: aribray <45905583+aribray@users.noreply.github.com>
Co-authored-by: Chalmer Lowe <chalmerlowe@google.com>
Co-authored-by: Mario Torres Jr <105736410+Mattix23@users.noreply.github.com>
Co-authored-by: Jared Chapman <thejaredchapman@gmail.com>
Co-authored-by: adhiggs <38925938+adhiggs@users.noreply.github.com>
Co-authored-by: Alvaro Viebrantz <aviebrantz@google.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lingqing Gan <lingqing.gan@gmail.com>
Co-authored-by: Kira <kirnendra@google.com>
Co-authored-by: Salem Jorden <115185670+SalemJorden@users.noreply.github.com>
Co-authored-by: Salem Boyland <salemb@google.com>
Co-authored-by: Stephanie A <129541811+DevStephanie@users.noreply.github.com>
Co-authored-by: shollyman <shollyman@google.com>
Co-authored-by: Leah Cole <coleleah@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the BigQuery API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigQuery: Remove location parameter from query code samples

5 participants