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

feat: support using BIGQUERY_EMULATOR_HOST environment variable - #1222

Merged
steffnay merged 16 commits into
googleapis:mainfrom
abecerrilsalas:apb_feature_bq_emulator
Apr 28, 2022
Merged

feat: support using BIGQUERY_EMULATOR_HOST environment variable#1222
steffnay merged 16 commits into
googleapis:mainfrom
abecerrilsalas:apb_feature_bq_emulator

Conversation

@abecerrilsalas

@abecerrilsalasabecerrilsalas commented Apr 19, 2022

Copy link
Copy Markdown
Contributor

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-labelproduct-auto-labelBot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/python-bigquery API. labels Apr 19, 2022
@abecerrilsalasabecerrilsalas changed the title abecerrilsalas feature bq emulatorfeat: bq emulatorApr 19, 2022
@steffnay
steffnay self-requested a review April 19, 2022 17:13

@steffnaysteffnay 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.

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

Comment threadgoogle/cloud/bigquery/client.py Outdated
Comment threadgoogle/cloud/bigquery/client.py Outdated
Comment threadtests/unit/test__helpers.py Outdated
Comment threadgoogle/cloud/bigquery/_helpers.py Outdated
@product-auto-labelproduct-auto-labelBot 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 review from a teamApril 23, 2022 04:56
Comment threadtests/unit/test__helpers.py Outdated
@product-auto-labelproduct-auto-labelBot added size: s Pull request size is small. and removed size: m Pull request size is medium. labels Apr 26, 2022
@steffnaysteffnay changed the title feat: bq emulatorfeat: support using BIGQUERY_EMULATOR_HOST environment variableApr 28, 2022
@steffnay
steffnay merged commit 39294b4 into googleapis:mainApr 28, 2022
@release-pleaserelease-pleaseBot mentioned this pull request 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 freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.size: sPull 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

@abecerrilsalas@steffnay