Title: Support (non-legacy) SQL nested data types · Issue #2354 · googleapis/google-cloud-python · GitHub
Open Graph Title: Support (non-legacy) SQL nested data types · Issue #2354 · googleapis/google-cloud-python
X Title: Support (non-legacy) SQL nested data types · Issue #2354 · googleapis/google-cloud-python
Description: STRUCT
Open Graph Description: STRUCT
X Description: STRUCT<t> and ARRAY<t> seem to be the types. See #2342. h/t to @c0b for filing. From #2585: Sample app that reproduces this Stacktrace: Traceback (most recent call last): File "sim...
Opengraph URL: https://github.com/googleapis/google-cloud-python/issues/2354
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support (non-legacy) SQL nested data types","articleBody":"`STRUCT\u003ct\u003e` and `ARRAY\u003ct\u003e` seem to be the types.\n\nSee #2342. h/t to @c0b for filing.\n\n---\n\nFrom #2585: [Sample app that reproduces this](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/176f161cae3d4f01b01456a6e403faf6645414a1/bigquery/cloud-client/simple_app.py)\n\nStacktrace:\n\n``` python\nTraceback (most recent call last):\n File \"simple_app.py\", line 57, in \u003cmodule\u003e\n query_shakespeare()\n File \"simple_app.py\", line 47, in query_shakespeare\n page_token=page_token)\n File \"lib/python2.7/site-packages/google/cloud/bigquery/query.py\", line 401, in fetch_data\n rows_data = _rows_from_json(response.get('rows', ()), self.schema)\n File \"lib/python2.7/site-packages/google/cloud/bigquery/_helpers.py\", line 98, in _rows_from_json\n for item in cell['v']])\n File \"lib/python2.7/site-packages/google/cloud/bigquery/_helpers.py\", line 61, in _record_from_json\n for subfield, cell in zip(field.fields, value['f']):\nKeyError: 'f'\n```\n\n---\n\nStepping into the debugger:\n\n``` python\nipdb\u003e value\n{u'v': {u'f': [{u'v': u'hamlet'}, {u'v': u'5318'}]}}\nipdb\u003e field.__dict__\n{'field_type': u'RECORD', 'description': None, 'name': u'title', 'fields': [\u003cgoogle.cloud.bigquery.schema.SchemaField object at 0x7f4ba9227550\u003e, \u003cgoogle.cloud.bigquery.schema.SchemaField object at 0x7f4ba9227690\u003e], 'mode': u'REPEATED'}\n```\n\n(Added by @dhermes)\n","author":{"url":"https://github.com/dhermes","@type":"Person","name":"dhermes"},"datePublished":"2016-09-19T22:08:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":22},"url":"https://github.com/2354/google-cloud-python/issues/2354"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:06c8a0af-e24d-cc40-9fd7-14e3135ec855 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C836:34CFAA:9C701B:D454B9:6A4D4C1F |
| html-safe-nonce | 911ea1ef20f32b5472016a10ae56b1c42ed2779931078dbbaf34a531fa7aba9c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDODM2OjM0Q0ZBQTo5QzcwMUI6RDQ1NEI5OjZBNEQ0QzFGIiwidmlzaXRvcl9pZCI6Ijg0MDU3MDE4NDcwNjc0NzkwNzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 95f20f05098528aca146fed4333a9f818994bb7b306fb83bf096091c07ddae64 |
| hovercard-subject-tag | issue:177911482 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-cloud-python/2354/issue_layout |
| twitter:image | https://opengraph.githubassets.com/34cded24477137330bf927e198d58c3244d122a11f064ba3e86dd358e5554568/googleapis/google-cloud-python/issues/2354 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/34cded24477137330bf927e198d58c3244d122a11f064ba3e86dd358e5554568/googleapis/google-cloud-python/issues/2354 |
| og:image:alt | STRUCT |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dhermes |
| hostname | github.com |
| expected-hostname | github.com |
| None | 92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/google-cloud-python git https://github.com/googleapis/google-cloud-python.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 16316451 |
| octolytics-dimension-repository_nwo | googleapis/google-cloud-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 16316451 |
| octolytics-dimension-repository_network_root_nwo | googleapis/google-cloud-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56fc8347865a14e2ec811533d68f929cf4e0ec19 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width