Skip to content

BigQuery: SchemaField cannot load resource with missing mode property #4456

Closed

Description

@tswast

The mode property is optional in the REST API, but this code fails:

SchemaField.from_api_repr({'name': 'colname', 'type': 'INT64'})

I believe this is due to the line

mode=api_repr['mode'].upper(),

which does not properly handle when the mode property is missing.

Related to #3723 as it is often convenient to omit the mode parameter when defining a schema file by hand.

Activity

  1. added
    api: bigqueryIssues related to the BigQuery API.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Nov 27, 2017
  2. self-assigned this
    on Nov 27, 2017
  3. added
    good first issueThis issue is a good place to started contributing to this repository.
    on Nov 27, 2017
  4. added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Nov 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the BigQuery API.good first issueThis issue is a good place to started contributing to this repository.priority: p2Moderately-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.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions