ODriscollBoys opened a new pull request, #40497:
URL: https://github.com/apache/beam/pull/40497
`WriteToBigQuery` accepts a string schema of comma separated `name:TYPE`
pairs. `get_table_schema_from_string` stripped whitespace around each pair but
not around the `:` inside it, so `schema='name: STRING'` produced a field of
type `' STRING'`, and BigQuery rejected the table creation with `Invalid value
for type: STRING is not a valid value`.
The field name and type are now stripped after splitting on `:`, the same
way whitespace around `,` is already ignored. Added a test with whitespace
before and after `:`; it fails on master and passes with the change. The
`TestWriteToBigQuery` tests in `bigquery_test.py` pass, and the rest of
`bigquery_test.py`, `bigquery_tools_test.py` and `bigquery_file_loads_test.py`
show the same results as on master locally (the only failures are tests that
need a GCP project).
fixes #25704
------------------------
- [x] Mention the appropriate issue in your description (for example:
`addresses #123`), if applicable. This will automatically add a link to the
pull request in the issue. If you would like the issue to automatically close
on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
- [x] Update `CHANGES.md` with noteworthy changes.
- [ ] If this contribution is large, please file an Apache [Individual
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
--
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]