Skip to content

Commit

Permalink
Update sdks/python/apache_beam/io/gcp/bigquery_tools.py
Browse files Browse the repository at this point in the history
Co-authored-by: Ahmed Abualsaud <[email protected]>
  • Loading branch information
TobiasBredow and ahmedabu98 authored Feb 3, 2025
1 parent 2d19e07 commit d6007dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdks/python/apache_beam/io/gcp/bigquery_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ def beam_row_from_dict(row: dict, schema):
# For this case, we create the field with a `None` value
# None is also set when a repeated field is missing as BigQuery
# converts Null Repeated fields to empty lists
if name not in row and (mode == "NULLABLE" or mode == "REPEATED"):
if name not in row and mode != "REQUIRED":
row[name] = None

value = row[name]
Expand Down

0 comments on commit d6007dc

Please sign in to comment.