Skip to content

feat(bigquery): allow passing schema as a sequence of dicts - #9550

Merged
plamut merged 11 commits into
googleapis:masterfrom
plamut:iss-8196
Nov 3, 2019
Merged

feat(bigquery): allow passing schema as a sequence of dicts#9550
plamut merged 11 commits into
googleapis:masterfrom
plamut:iss-8196

Conversation

@plamut

@plamutplamut commented Oct 28, 2019

Copy link
Copy Markdown
Contributor

Fixes#8196.

This PR adds support for passing BigQuery schema as a sequence of plain dictionaries whose content match the API representation of schema.SchemaField instances.

How to test

THe ticket description should be self-explanatory. The functions/methods that accept a BigQuery schema should now also accept a sequence of well-formed dicts. That includes private helpers, as this new flexibility can be useful even for internal use cases.

@plamutplamut added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: bigquery Issues related to the BigQuery API. labels Oct 28, 2019
@plamut
plamut requested a review from a teamOctober 28, 2019 19:43
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 28, 2019
Comment threadbigquery/google/cloud/bigquery/_helpers.py Outdated
Comment threadbigquery/google/cloud/bigquery/_pandas_helpers.py
Comment threadbigquery/google/cloud/bigquery/_pandas_helpers.py
Comment threadbigquery/google/cloud/bigquery/schema.py Outdated
Comment threadbigquery/google/cloud/bigquery/table.py Outdated
@plamut

plamut commented Oct 29, 2019

Copy link
Copy Markdown
ContributorAuthor

For some reason black started to behave a bit differently, had to blacken a few files at places that this PR did not touch. Seems like a few things have changed in the new version released today.

Comment threadbigquery/google/cloud/bigquery/_helpers.py Outdated
Comment threadbigquery/google/cloud/bigquery/_pandas_helpers.py
Comment threadbigquery/google/cloud/bigquery/schema.py Outdated
@plamut
plamut requested review from tseaver and tswastNovember 1, 2019 10:24

@tswasttswast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigqueryIssues related to the BigQuery API.cla: yesThis human has signed the Contributor License Agreement.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BigQuery: [Primitive-ize API] SchemaField

4 participants

@plamut@tseaver@tswast@googlebot