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

BigQuery copy method can convert dict column to JSON string #1143

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

austinweisgrau
Copy link
Collaborator

By default without this change, a dict column will cause the copy method to fail.

This is a more robust followup to #1028 and #1068. At the time we decided to remove support for loading dict columns to BigQuery because there wasn't a super simple way to accomplish this. Instead we encouraged users to convert the dict columns to strings themselves if they desired to do so. This change makes that workaround happen by default, but it can be turned off with the convert_dict_columns_to_json flag to BigQuery().copy()

Copy link
Contributor

@KasiaHinkson KasiaHinkson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it, I think this is an elegant solution that'll help a lot of people out.

By default without this change, a dict column will cause the copy
method to fail.
@austinweisgrau austinweisgrau merged commit 1642d6e into move-coop:main Oct 10, 2024
28 checks passed
@austinweisgrau austinweisgrau deleted the bq_copy_dict branch October 10, 2024 15:32
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.

2 participants