Skip to content

Conversation

@chalmerlowe
Copy link
Collaborator

@chalmerlowe chalmerlowe commented Oct 15, 2025

This change modifies the behavior when a DataFrame is loaded to BigQuery with a schema that contains fields not present in the DataFrame.

Instead of raising a ValueError, a UserWarning is now issued, and the extra fields are appended to the schema. This allows for more flexible data loading scenarios.

CONTEXT: this was originally a suggestion for the python-bigquery library and we made the decision to move it here since we are deprecating that corresponding function in python-bigquery. That suggestion was found in the following python-bigquery Issue:

Fixes googleapis/python-bigquery#1812 🦕

This change modifies the behavior when a DataFrame is loaded to BigQuery with a schema that contains fields not present in the DataFrame.

Instead of raising a `ValueError`, a `UserWarning` is now issued, and the extra fields are appended to the schema. This allows for more flexible data loading scenarios.
@chalmerlowe chalmerlowe requested review from a team as code owners October 15, 2025 16:22
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Oct 15, 2025
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-pandas API. label Oct 15, 2025
@chalmerlowe chalmerlowe assigned chalmerlowe and unassigned Linchin Oct 15, 2025
Copy link
Collaborator

@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!

@tswast tswast enabled auto-merge (squash) October 28, 2025 16:57
@tswast tswast merged commit a529505 into main Oct 28, 2025
23 of 26 checks passed
@tswast tswast deleted the feat/allow-extra-schema-fields branch October 28, 2025 17:08
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 googleapis/python-bigquery-pandas API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow load_table_from_dataframe to Ignore Extra Schema Fields

4 participants