-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Unexpected Empty Records in Nested Arrays When Using BigQueryIO.write() with .withAutoSchemaUpdate(true) and .ignoreUnknownValues() #33842
Comments
For additional context, we’re writing to a dynamically selected BigQuery table: BigQueryIO.<TableRowWrapper>write()
.to(input -> createTableSpec(input, project, topicTableMapping)) The issue may stem from line 181, where Lines 180 to 192 in c7b2695
|
cc @ahmedabu98 |
Hey @Igor-Domin, I'm trying to figure out why you're writing array data to a REQUIRED field. Unless you intend for "external_ids" to indeed be an array of records, in which case you'd need to change type to REPEATED. Lmk if I'm missing something |
Hello @ahmedabu98, oh I've made a typo, the mode is set to REPEATED :) |
@ahmedabu98 Could you have a second look at this? |
repro
example error:
|
What happened?
When enabling .withAutoSchemaUpdate(true) and .ignoreUnknownValues() with BigQueryIO.write() method, unexpected behavior happens causing records with nested arrays to fail being written to BQ. An empty record is added into the array, causing schema validation issues. This behavior does not occur without these two settings enabled.
Expected behavior:
Records should be mapped without additional empty objects being added to array
Actual Behavior:
Records in arrays are unexpectedly populated with an empty record, resulting in schema validation failures during write operations.
Steps to reproduce:
Example big querry nested record field:
This is what response would look like:
Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
Issue Components
The text was updated successfully, but these errors were encountered: