-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
BigQuery: Field <field> has changed mode from REQUIRED to NULLABLE #8093
Comments
@tswast ISTM that |
Hmm, looks like this one is related to #7370. |
I think BigQuery is probably auto-detecting the column as nullable since it's a parquet file. I don't think parquet has the option of required types. @timocb Does this error still occur when you supply a schema manually to the load job? e.g. job_config = bigquery.LoadJobConfig(schema=schema)
load_job = Config.CLIENT.load_table_from_dataframe(
df, table_ref, job_config=job_config
)
load_job.result() |
@tswast Using your suggestion of passing the schema using the job_config, I get the following error:
It seems like what @tseaver is saying is correct. Parquet specifies the fields as |
@timocb Thanks for reporting. As far as I can tell, there's no way to mark a column as REQUIRED in a parquet file, so I've raised this as a backend feature request at https://issuetracker.google.com/133415569 feel free to "star" it to watch for updates. |
Turns out Parquet does have the ability to mark columns as required, but there's an open issue in Arrow to support it. https://issues.apache.org/jira/browse/ARROW-5169 |
I am encountering the following problem, when uploading a Pandas DataFrame to a partitioned table:
Environment details
API: BigQuery
OS: macOS High Sierra 10.13.6
Python: 3.5.7
Packages:
Steps to reproduce
Create a table on BigQuery with the following fields:
Reproducible code example (includes creating table)
Output:
The text was updated successfully, but these errors were encountered: