From e1c5f0de1d7fef2b50356730bd6f32fe676f2996 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 12 Jan 2021 16:48:47 -0600 Subject: [PATCH 1/2] docs: request only a single stream in dataframe example --- samples/to_dataframe/main_test.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/samples/to_dataframe/main_test.py b/samples/to_dataframe/main_test.py index 46820578..6e817f09 100644 --- a/samples/to_dataframe/main_test.py +++ b/samples/to_dataframe/main_test.py @@ -31,7 +31,10 @@ def clients(): ) # Make clients. - bqclient = bigquery.Client(credentials=credentials, project=your_project_id,) + bqclient = bigquery.Client( + credentials=credentials, + project=your_project_id, + ) bqstorageclient = bigquery_storage.BigQueryReadClient(credentials=credentials) # [END bigquerystorage_pandas_tutorial_create_client] # [END bigquerystorage_pandas_tutorial_all] @@ -124,7 +127,9 @@ def test_session_to_dataframe(capsys, clients): read_options=read_options, ) read_session = bqstorageclient.create_read_session( - parent=parent, read_session=requested_session + parent=parent, + read_session=requested_session, + max_stream_count=1, ) # This example reads from only a single stream. Read from multiple streams From 9eddc9f8aad7de5c4ff4d4a8b3a5b7e26e3274b7 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 12 Jan 2021 17:01:24 -0600 Subject: [PATCH 2/2] blacken --- samples/to_dataframe/main_test.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/samples/to_dataframe/main_test.py b/samples/to_dataframe/main_test.py index 6e817f09..bda6d601 100644 --- a/samples/to_dataframe/main_test.py +++ b/samples/to_dataframe/main_test.py @@ -31,10 +31,7 @@ def clients(): ) # Make clients. - bqclient = bigquery.Client( - credentials=credentials, - project=your_project_id, - ) + bqclient = bigquery.Client(credentials=credentials, project=your_project_id,) bqstorageclient = bigquery_storage.BigQueryReadClient(credentials=credentials) # [END bigquerystorage_pandas_tutorial_create_client] # [END bigquerystorage_pandas_tutorial_all] @@ -127,9 +124,7 @@ def test_session_to_dataframe(capsys, clients): read_options=read_options, ) read_session = bqstorageclient.create_read_session( - parent=parent, - read_session=requested_session, - max_stream_count=1, + parent=parent, read_session=requested_session, max_stream_count=1, ) # This example reads from only a single stream. Read from multiple streams