Skip to content

Add option to use BigQuery Storage API from IPython magics - #7640

Merged
tswast merged 5 commits into
googleapis:masterfrom
tswast:bqstorage-magics
Apr 3, 2019
Merged

tswast merged 5 commits into
googleapis:masterfrom
tswast:bqstorage-magics

Conversation

@tswast

@tswast tswast commented Apr 1, 2019

Copy link
Copy Markdown
Contributor

Construct and use a BigQuery Storage API client when either the
context.use_bqstorage_api property is set, or the --use_bqstorage_api
parameter is passed into the magic.

@tswast
tswast requested review from alixhami and shollyman April 1, 2019 23:21
@tswast
tswast requested a review from crwilcox as a code owner April 1, 2019 23:21
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 1, 2019
@tswast

tswast commented Apr 2, 2019

Copy link
Copy Markdown
Contributor Author

BigQuery tests are passing. Other failures appear to be Kokoro-induced flakes.

Comment thread bigquery/google/cloud/bigquery/magics.py Outdated
Comment thread bigquery/tests/unit/test_magics.py Outdated
@pytest.mark.skipIf(
bigquery_storage_v1beta1 is None, "Requires `google-cloud-bigquery-storage`"
)
def test_bigquery_magic_with_bqstorage(monkeypatch):

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.

Can you add a test or update an existing test asserting that the BQ storage API is not used when the new parameter is not set?

Comment thread bigquery/tests/unit/test_magics.py
Comment thread bigquery/google/cloud/bigquery/magics.py Outdated
tswast added 2 commits April 2, 2019 14:53
Construct and use a BigQuery Storage API client when either the
context.use_bqstorage_api property is set, or the --use_bqstorage_api
parameter is passed into the magic.
@tswast
tswast force-pushed the bqstorage-magics branch from 99d3515 to ef4aa5d Compare April 2, 2019 21:53
@tswast
tswast requested a review from alixhami April 3, 2019 22:53
@tswast
tswast merged commit 33fcc1c into googleapis:master Apr 3, 2019
@tswast
tswast deleted the bqstorage-magics branch April 3, 2019 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants