jledrumics opened a new issue, #30753:
URL: https://github.com/apache/beam/issues/30753
### What happened?
Python Apache BEAM version 2.44
When using WriteToBigquery with STORAGE_WRITE_API method and some NULLABLE
nested field, even if the field is not in the input dict, or is None, the code
will try to resolve the inner fields and then fails. This is in the
`beam_row_from_dict` method.
A failing example there :
```python
from apache_beam.io.gcp.bigquery_tools import beam_row_from_dict
schema = {
"fields": [
{"name": "log_id", "type": "STRING", "mode": "REQUIRED"},
{
"name": "profilematch",
"type": "RECORD",
"mode": "NULLABLE",
"fields": [
{"name": "id", "type": "STRING", "mode": "REQUIRED"},
{"name": "source", "type": "STRING", "mode": "REQUIRED"},
{"name": "channel", "type": "STRING", "mode": "NULLABLE"},
],
},
]
}
row = {
"log_id": "727254-32022246-026",
"profilematch": None, # same when quoting the field
}
beam_row = beam_row_from_dict(row, schema)
print(beam_row)
```
### Issue Priority
Priority: 2 (default / most bugs should be filed as P2)
### Issue Components
- [X] Component: Python SDK
- [ ] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [ ] Component: IO connector
- [ ] Component: Beam YAML
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [ ] Component: Google Cloud Dataflow Runner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]