-
Notifications
You must be signed in to change notification settings - Fork 1.6k
BigQuery: LoadJobConfig.schema setter should accept None #9074
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
Comments
@plamut Should be a pretty small change to |
Just so we don't lose the additional context from #9064 (comment), I'm copying my comment here as well. Since there is already a partial schema set, we have to unset it somehow. Otherwise, the number of columns in the load job does not match the number of columns in the file. It turns out, setting an empty schema has a different behavior in the backend than not setting a schema at all.
To fix this, the correct thing to do is to unset the schema if set, which is why I filed: #9074
|
Is your feature request related to a problem? Please describe.
There is no (public) way to unset a schema after you've set one. Even though the client doesn't distinguish between unset schema and an empty schema, the backend API does.
Describe the solution you'd like
When the set schema is
None
, remove the whole schema property from the underlying_properties
.Describe alternatives you've considered
We could always send
None
if a schema is empty, but this wouldn't be right, either.Additional context
Needed for #9064
The text was updated successfully, but these errors were encountered: