GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Correctly model JSON repr of complex nested records. by tseaver · Pull Request #2787 · googleapis/google-cloud-python

Conversation

@tseaver

@tseaver tseaver commented Nov 30, 2016

Copy link
Copy Markdown
Contributor

Closes #2354.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tseaver
Correctly model JSON repr of complex nested records.
0ade581
Closes #2354.
@tseaver tseaver added the api: bigquery Issues related to the BigQuery API. label Nov 30, 2016
@tseaver tseaver assigned daspecster and dhermes Nov 30, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 30, 2016
daspecster
daspecster reviewed Nov 30, 2016
View reviewed changes
Comment thread bigquery/unit_tests/test__helpers.py
subfield = _Field('REPEATED', 'color', 'STRING')
field = _Field('REQUIRED', fields=[subfield])
value = {'f': [{'v': ['red', 'yellow', 'blue']}]}
value = {'f': [{'v': [{'v': 'red'}, {'v': 'yellow'}, {'v': 'blue'}]}]}

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver tseaver mentioned this pull request Nov 30, 2016
Support (non-legacy) SQL nested data types #2354
Closed
@daspecster

daspecster commented Dec 2, 2016

Copy link
Copy Markdown
Contributor

AFAICT this looks good. The nesting is a bit mesmerizing though. I would think a system test might be helpful? Should we make an issue to add a system test after this PR?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dhermes
dhermes reviewed Dec 2, 2016
View reviewed changes
Comment thread bigquery/google/cloud/bigquery/_helpers.py
converter = _CELLDATA_FROM_JSON[subfield.field_type]
if field.mode == 'REPEATED':
value = [converter(item, subfield) for item in cell['v']]
if subfield.mode == 'REPEATED':

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dhermes
dhermes approved these changes Dec 2, 2016
View reviewed changes
@tseaver

tseaver commented Dec 2, 2016

Copy link
Copy Markdown
Contributor Author

@daspecster Good point -- I will add a system test using the examples I generated to test the stuff manually.

daspecster reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver
Add system test exercising query results w/ nested structs / arrays.
ab9278f
Addresses:
#2787 (comment)
@tseaver
tseaver merged commit 8ff90db into googleapis:master Dec 2, 2016
@tseaver
tseaver deleted the 2354-bigquery-nested_data_types branch December 2, 2016 19:34
@tseaver tseaver mentioned this pull request Dec 5, 2016
New Standard SQL Data Types Not Supported in gcloud._helpers._rows_from_json() / _CELLDATA_FROM_JSON() #2229
Closed
@dhermes dhermes mentioned this pull request Dec 5, 2016
Cutting new releases for BigQuery, Language and Core. #2815
Merged
@tseaver tseaver mentioned this pull request Dec 6, 2016
Error when running BiqQuery query with APPROX_QUANTILES #2804
Closed
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
@tseaver
Add system test exercising query results w/ nested structs / arrays.
fe84ff3
Addresses:
googleapis#2787 (comment)
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
@tseaver
Merge pull request googleapis#2787 from tseaver/2354-bigquery-nested_…
6e93c48
…data_types

Correctly model JSON repr of complex nested records.
@theacodes theacodes unassigned daspecster and dhermes Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@daspecster daspecster daspecster left review comments
@dhermes dhermes dhermes approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: bigquery Issues related to the BigQuery API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@tseaver @daspecster @dhermes @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.