Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 11 commits into from
Nov 3, 2019

Conversation

plamut
Copy link
Contributor

@plamut plamut commented Oct 28, 2019

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.

@plamut plamut 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 team October 28, 2019 19:43
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 28, 2019
bigquery/google/cloud/bigquery/_helpers.py Outdated Show resolved Hide resolved
bigquery/google/cloud/bigquery/schema.py Outdated Show resolved Hide resolved
bigquery/google/cloud/bigquery/table.py Outdated Show resolved Hide resolved
@plamut
Copy link
Contributor Author

plamut commented Oct 29, 2019

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.

@plamut plamut requested review from tswast and tseaver November 1, 2019 10:24
Copy link
Contributor

@tswast tswast left a comment

Choose a reason for hiding this comment

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

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API. cla: yes This 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