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

feat: Allow Users to Supply Their Own BigQuery Client - #474

Merged
chalmerlowe merged 2 commits into
googleapis:mainfrom
waltaskew:supply-own-client
Sep 23, 2022
Merged

feat: Allow Users to Supply Their Own BigQuery Client#474
chalmerlowe merged 2 commits into
googleapis:mainfrom
waltaskew:supply-own-client

Conversation

@waltaskew

Copy link
Copy Markdown
Contributor
  • Add a flag 'user_supplied_client' which prevents the library from attempting
    to create a BigQuery client.
  • Document the use of connect_args for suppling their own BigQuery client
    to the dbapi

Fixes#464 🦕

@waltaskew
waltaskew requested review from a team and shollymanJuly 21, 2022 00:50
@product-auto-labelproduct-auto-labelBot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. labels Jul 21, 2022
@shollyman
shollyman requested review from aribray, chalmerlowe and loferris and removed request for shollymanJuly 22, 2022 23:15
@partheaparthea added the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 12, 2022
@gcf-owl-botgcf-owl-botBot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 12, 2022
@partheaparthea added 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. owlbot:run Add this label to trigger the Owlbot post processor. labels Aug 12, 2022
@gcf-owl-botgcf-owl-botBot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 12, 2022
@yoshi-kokoroyoshi-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 Aug 12, 2022
@DimaK415

Copy link
Copy Markdown

Please implement this! Will really help with Airflow use cases

@parthea

Copy link
Copy Markdown
Contributor

@chalmerlowe Please could you take a look?

@chalmerlowe

Copy link
Copy Markdown
Contributor

I will look at this and provide some feedback.

Comment threadREADME.rst Outdated

engine = create_engine(
'bigquery://some-project/some-dataset?user_supplied_client=True',
connect_args={'client': bq_client},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

bq_client should be custom_bq_client

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

fixed!

@DimaK415

Copy link
Copy Markdown

Just a heads up. I've tested the functionality of this PR and it seems to work. No issues found so far.

- Add a flag 'user_supplied_client' which prevents the library from attempting
to create a BigQuery client.
- Document the use of `connect_args` for suppling their own BigQuery client
to the dbapi
@DimaK415

Copy link
Copy Markdown

Anything I can help with to get this moving?

@tswasttswast changed the title Allow Users to Supply Their Own BigQuery Clientfeat: Allow Users to Supply Their Own BigQuery ClientSep 22, 2022
@tswasttswast added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 22, 2022
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 22, 2022
@tswasttswast added the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 23, 2022
@gcf-owl-botgcf-owl-botBot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 23, 2022

@chalmerlowechalmerlowe left a comment

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.

LGTM

@chalmerlowe
chalmerlowe merged commit 4f72d4e into googleapis:mainSep 23, 2022
@release-pleaserelease-pleaseBot mentioned this pull request Sep 23, 2022
@chalmerlowe

Copy link
Copy Markdown
Contributor

@waltaskew@DimaK415

Thank you for you assistance in getting this over the finish line.

@waltaskew
waltaskew deleted the supply-own-client branch September 23, 2022 23:17
atkincaid74 added a commit to KoffieLabs/python-bigquery-sqlalchemy that referenced this pull request Dec 19, 2022
Revert "docs: fix changelog header to consistent size (googleapis#461)"
This reverts commit 177e70a.
Revert "chore: test minimum dependencies in python 3.7 (googleapis#463)"
This reverts commit acc9274.
Revert "chore(main): release 1.4.4 (googleapis#462)"
This reverts commit 06c0270.
Revert "fix: require python 3.7+ (googleapis#468)"
This reverts commit 52ec808.
Revert "chore(python): fix prerelease session [autoapprove] (googleapis#476)"
This reverts commit e894dfa.
Revert "chore: add hashes to requirements.txt' (googleapis#483)"
This reverts commit cc13fe3.
Revert "chore(python): exclude `grpcio==1.49.0rc1` in tests (googleapis#484)"
This reverts commit 484d524.
Revert "ci(python): fix path to requirements.txt in release script (googleapis#485)"
This reverts commit 4f90d90.
Revert "chore(python): update .kokoro/requirements.txt (googleapis#486)"
This reverts commit 4b37fed.
Revert "chore(python): exclude setup.py in renovate config (googleapis#487)"
This reverts commit 9ffc736.
Revert "chore(deps): update all dependencies (googleapis#488)"
This reverts commit 189af9b.
Revert "chore: detect samples tests in nested directories (googleapis#492)"
This reverts commit f566371.
Revert "feat: Allow Users to Supply Their Own BigQuery Client (googleapis#474)"
This reverts commit 4f72d4e.
Revert "chore: update dependency protobuf >= 3.20.2 (googleapis#498)"
This reverts commit f188944.
Revert "fix: Sets cache support to false, removes upper req limit (googleapis#499)"
This reverts commit be63adc.
Revert "fix: updates test to account for UTC in failing test (googleapis#501)"
This reverts commit a050ccf.
Revert "fix(deps): allow pyarrow version 7+ (googleapis#479)"
This reverts commit 0f6be67.
Revert "fix: use packaging version parser instead of string splitting (googleapis#513)"
This reverts commit bb7f6a7.
Revert "chore(main): release 1.5.0 (googleapis#469)"
This reverts commit 1ffab57.
Revert "chore: addressed lint issue with __version__ (googleapis#534)"
This reverts commit 4e17259.
Revert "build(deps): bump certifi from 2022.9.24 to 2022.12.7 in /synthtool/gcp/templates/python_library/.kokoro (googleapis#535)"
This reverts commit 57794c3.
atkincaid74 added a commit to KoffieLabs/python-bigquery-sqlalchemy that referenced this pull request Mar 16, 2023
Revert "docs: fix changelog header to consistent size (googleapis#461)"
This reverts commit 177e70a.
Revert "chore: test minimum dependencies in python 3.7 (googleapis#463)"
This reverts commit acc9274.
Revert "chore(main): release 1.4.4 (googleapis#462)"
This reverts commit 06c0270.
Revert "fix: require python 3.7+ (googleapis#468)"
This reverts commit 52ec808.
Revert "chore(python): fix prerelease session [autoapprove] (googleapis#476)"
This reverts commit e894dfa.
Revert "chore: add hashes to requirements.txt' (googleapis#483)"
This reverts commit cc13fe3.
Revert "chore(python): exclude `grpcio==1.49.0rc1` in tests (googleapis#484)"
This reverts commit 484d524.
Revert "ci(python): fix path to requirements.txt in release script (googleapis#485)"
This reverts commit 4f90d90.
Revert "chore(python): update .kokoro/requirements.txt (googleapis#486)"
This reverts commit 4b37fed.
Revert "chore(python): exclude setup.py in renovate config (googleapis#487)"
This reverts commit 9ffc736.
Revert "chore(deps): update all dependencies (googleapis#488)"
This reverts commit 189af9b.
Revert "chore: detect samples tests in nested directories (googleapis#492)"
This reverts commit f566371.
Revert "feat: Allow Users to Supply Their Own BigQuery Client (googleapis#474)"
This reverts commit 4f72d4e.
Revert "chore: update dependency protobuf >= 3.20.2 (googleapis#498)"
This reverts commit f188944.
Revert "fix: Sets cache support to false, removes upper req limit (googleapis#499)"
This reverts commit be63adc.
Revert "fix: updates test to account for UTC in failing test (googleapis#501)"
This reverts commit a050ccf.
Revert "fix(deps): allow pyarrow version 7+ (googleapis#479)"
This reverts commit 0f6be67.
Revert "fix: use packaging version parser instead of string splitting (googleapis#513)"
This reverts commit bb7f6a7.
Revert "chore(main): release 1.5.0 (googleapis#469)"
This reverts commit 1ffab57.
Revert "chore: addressed lint issue with __version__ (googleapis#534)"
This reverts commit 4e17259.
Revert "build(deps): bump certifi from 2022.9.24 to 2022.12.7 in /synthtool/gcp/templates/python_library/.kokoro (googleapis#535)"
This reverts commit 57794c3.
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigqueryIssues related to the googleapis/python-bigquery-sqlalchemy API.size: mPull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to Create Engine From an Existing BigQuery Client

6 participants

@waltaskew@DimaK415@parthea@chalmerlowe@tswast@yoshi-kokoro