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

2 participants