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

Fix nullable column type parsing by BigQuery connector #958

Closed

Conversation

austinweisgrau
Copy link
Collaborator

@austinweisgrau austinweisgrau commented Dec 12, 2023

If a Parsons Table column has values like [None, None, True, False],
the BigQuery connector will infer that the appropriate type for this
column is NoneType, which it will translate into a STRING type.

This change ensures that types returned by petl.typecheck() will
choose the first available type that isnt NoneType if that is
available.

Adds a test that checks if the connector is able to successfully parse a column type when nulls are included. First commit here will allow test to run and fail, second commit will make the fix and demonstrate the test succeeds.

If a Parsons Table column has values like `[None, None, True, False]`,
the BigQuery connector will infer that the appropriate type for this
column is NoneType, which it will translate into a STRING type.

This change ensures that types returned by petl.typecheck() will
choose the first available type that isn't 'NoneType' if that is
available.
@austinweisgrau
Copy link
Collaborator Author

Closing this in favor of consolidated fixes in #959

@austinweisgrau austinweisgrau deleted the bigquery_type_none branch December 14, 2023 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant