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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support using BIGQUERY_EMULATOR_HOST environment variable #1222

Merged
merged 16 commits into from
Apr 28, 2022

Conversation

abecerrilsalas
Copy link
Contributor

@abecerrilsalas abecerrilsalas commented Apr 19, 2022

What?

Implemented a BIGQUERY_EMULATOR_HOST environment variable to be used to set the api_endpoint in the python-bigquery client constructor.

Why?

Users have requested this implementation (#1193). Currently there is no logic to check for the existence of a BIGQUERY_EMULATOR_HOST or some similar environment variable

How?

Logic was applied and code was changed in the _helpers.py and client.py files.

  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #1193 🦕

@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/python-bigquery API. labels Apr 19, 2022
@abecerrilsalas abecerrilsalas changed the title abecerrilsalas feature bq emulator feat: bq emulator Apr 19, 2022
@steffnay steffnay self-requested a review April 19, 2022 17:13
Copy link
Contributor

@steffnay steffnay left a comment

Choose a reason for hiding this comment

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

Looking good! Just needing changes to variable naming and then the additional tests you have planned.

google/cloud/bigquery/client.py Outdated Show resolved Hide resolved
google/cloud/bigquery/client.py Outdated Show resolved Hide resolved
tests/unit/test__helpers.py Outdated Show resolved Hide resolved
google/cloud/bigquery/_helpers.py Outdated Show resolved Hide resolved
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Apr 20, 2022
@abecerrilsalas abecerrilsalas marked this pull request as ready for review April 23, 2022 04:56
@abecerrilsalas abecerrilsalas requested a review from a team April 23, 2022 04:56
@abecerrilsalas abecerrilsalas requested a review from a team as a code owner April 23, 2022 04:56
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: m Pull request size is medium. labels Apr 26, 2022
@steffnay steffnay changed the title feat: bq emulator feat: support using BIGQUERY_EMULATOR_HOST environment variable Apr 28, 2022
@steffnay steffnay merged commit 39294b4 into googleapis:main Apr 28, 2022
waltaskew pushed a commit to waltaskew/python-bigquery that referenced this pull request Jul 20, 2022
…leapis#1222)

* feat:adding emulator

* apb_feature_bq_emulator_test

* apb_feature_bq_emulator_variable_name_change

* abecerrilsalas_feature_bq_emulator_typo_changes

* feat:fixing var names and start of test

* abecerrilsalas_feature_additional_tests

* feat: testing update

* feat: fixed failed lint test
abdelmegahedgoogle pushed a commit to abdelmegahedgoogle/python-bigquery that referenced this pull request Apr 17, 2023
…leapis#1222)

* feat:adding emulator

* apb_feature_bq_emulator_test

* apb_feature_bq_emulator_variable_name_change

* abecerrilsalas_feature_bq_emulator_typo_changes

* feat:fixing var names and start of test

* abecerrilsalas_feature_additional_tests

* feat: testing update

* feat: fixed failed lint test
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 googleapis/python-bigquery API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow setting of api_endpoint via environment variable like google-cloud-storage
2 participants