- Notifications
You must be signed in to change notification settings - Fork 321
Closed
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.Issues related to the googleapis/python-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
- OS type and version: MacOS Ventura 13.1
- Python version: 3.9.5
- pip version: 22.3.1
google-cloud-bigqueryversion: 3.5.0
Steps to reproduce
- Create table with record field containing a JSON subfield
- Query record field and try to read row from query result
Code example
from google.cloud import bigquery bigquery.Client().query("SELECT record_with_json_subfield.* FROM <table>").result().__next__()Stack trace
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 1, in <listcomp> File "lib/python3.9/site-packages/google/api_core/page_iterator.py", line 209, in _items_iter for item in page: File "lib/python3.9/site-packages/google/api_core/page_iterator.py", line 131, in __next__ result = self._item_to_value(self._parent, item) File "lib/python3.9/site-packages/google/cloud/bigquery/table.py", line 2710, in _item_to_row _helpers._row_tuple_from_json(resource, iterator.schema), File "lib/python3.9/site-packages/google/cloud/bigquery/_helpers.py", line 435, in _row_tuple_from_json row_data.append(_field_from_json(cell["v"], field)) File "lib/python3.9/site-packages/google/cloud/bigquery/_helpers.py", line 411, in _field_from_json return converter(resource, field) File "lib/python3.9/site-packages/google/cloud/bigquery/_helpers.py", line 368, in _record_from_json converter = _CELLDATA_FROM_JSON[subfield.field_type] KeyError: 'JSON' PaxonF, hspak, rasnes, sirkozuch, tomwojcik-adverity and 9 more
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.Issues related to the googleapis/python-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.