File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
packages/google-cloud-bigquery-storage/samples/pyarrow Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 2020from google .cloud .bigquery import enums
2121from google .cloud .bigquery_storage_v1 import types as gapic_types
2222from google .cloud .bigquery_storage_v1 .writer import AppendRowsStream
23- import pandas as pd
2423
24+ import pandas as pd
2525import pyarrow as pa
2626
2727TABLE_LENGTH = 100_000
@@ -174,8 +174,11 @@ def generate_write_requests(pyarrow_table):
174174
175175 if batch_size > max_request_bytes :
176176 raise ValueError (
177- f"A single PyArrow batch of one row is larger than the maximum request size (batch size: { batch_size } > max request size: { max_request_bytes } ). "
178- "Cannot proceed."
177+ (
178+ "A single PyArrow batch of one row is larger than the "
179+ f"maximum request size (batch size: { batch_size } > "
180+ f"max request size: { max_request_bytes } ). Cannot proceed."
181+ )
179182 )
180183
181184 if current_size + batch_size > max_request_bytes and batches_in_request :
You can’t perform that action at this time.
0 commit comments