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

chore: Replace timestamp in staged bigquery table name with uuid #113

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

deadlycoconuts
Copy link
Contributor

Context

Running the utils function stage_entities_to_bq concurrently may potentially cause BigQuery tables created to share the same timestamp, up to the second. This will cause data to be appended to the same table unexpected and/or cause other concurrent runs to get a "Precondition check failed" 412 PATCH bigquery update_table error from BigQuery as the table they are supposed to write to is changed unexpectedly (by another concurrent run) before the write job begins.

The fix introduced simply replaces the timestamp in the table name created with a uuid.

@khorshuheng khorshuheng merged commit 15f8bda into main Nov 21, 2023
1 check passed
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