Skip to content

Commit

Permalink
docs(python): Include parquet options in BigQuery I/O write sample (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tswast authored Dec 14, 2024
1 parent b799459 commit 52170ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/source/src/python/user-guide/io/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@
with io.BytesIO() as stream:
df.write_parquet(stream)
stream.seek(0)
parquet_options = bigquery.ParquetOptions()
parquet_options.enable_list_inference = True
job = client.load_table_from_file(
stream,
destination='tablename',
project='projectname',
job_config=bigquery.LoadJobConfig(
source_format=bigquery.SourceFormat.PARQUET,
parquet_options=parquet_options,
),
)
job.result() # Waits for the job to complete
Expand Down

0 comments on commit 52170ce

Please sign in to comment.