You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 30, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 30, 2026. It is now read-only.
[Bigquery] LoadJobConfiguration does not correctly handle preserveAsciiControlCharacters #3873
It looks like LoadJobConfiguration doesn't pass through CsvOptions.preserveAsciiControlCharacters to the Bigquery API correctly. Even after setting this flag, Bigquery still rejects CSV files containing null bytes.
Version(s): com.google.cloud:libraries-bom 26.57.0 and 26.62.0 (26.62.0 is the latest version as of 2025/06/30)
Steps to reproduce
Create a one-column, one-row CSV file containing a null character (e.g. fo<null>o); upload it to GCS
2. example: test.csv
Create a Bigquery table: create table foo.bar (the_column STRING)
Try to run a load job with setPreserveAsciiControlCharacters(true) from the GCS file into the table (see code example below)
Bigquery will fail the job with Bad character (ASCII 0) encountered.
Compare this behavior to using the bigquery CLI, where it runs successfully (can be verified with select the_column, to_code_points(the_column) from foo.bar):
changed the title [-][Bigquery] LoadJobConfiguration does not accept preserveAsciiControlCharacters[/-][+][Bigquery] LoadJobConfiguration does not correctly handle preserveAsciiControlCharacters[/+]on Jun 30, 2025
Activity
[-][Bigquery] LoadJobConfiguration does not accept preserveAsciiControlCharacters[/-][+][Bigquery] LoadJobConfiguration does not correctly handle preserveAsciiControlCharacters[/+]suztomo commentedon Jul 1, 2025
Moving this to java-bigquery repository.
PhongChuong commentedon Jul 4, 2025
@edgao , thank you for the detailed bug report.
#3876 should fix the issue, I'll update the bug when it's merged and released.
PhongChuong commentedon Jul 15, 2025
The fix is released in v2.53.0.
Please open a new bug if you encounter further issues.
edgao commentedon Jul 15, 2025
🎉 yep, confirmed locally that it works now, thanks!