Skip to content

fix(bigquery): Recreate view on schema change in BigQuery#766

Open
iambriccardo wants to merge 2 commits into
mainfrom
riccardobusetti/etl-636-recreate-bigquery-view-when-schema-is-updated
Open

fix(bigquery): Recreate view on schema change in BigQuery#766
iambriccardo wants to merge 2 commits into
mainfrom
riccardobusetti/etl-636-recreate-bigquery-view-when-schema-is-updated

Conversation

@iambriccardo
Copy link
Copy Markdown
Contributor

@iambriccardo iambriccardo commented May 22, 2026

Summary

  • Force BigQuery logical view recreation after applying schema DDL, even when the view already points to the same sequenced physical table.
  • Keep the schema-change order as physical table DDL, CREATE OR REPLACE VIEW, destination metadata Applied, then Storage Write API connection invalidation.
  • Clarify BigQuery destination naming so sequenced physical table ids use sequenced_bigquery_table_id and logical/base view ids use bigquery_table_id.
  • Extend the BigQuery schema-change integration test to assert logical view schema metadata refreshes, not just physical table schema.

Why

BigQuery logical views can keep stale schema metadata after the underlying table schema changes. Re-running CREATE OR REPLACE VIEW logical_view AS SELECT * FROM physical_table_n refreshes the view object without dropping it, avoiding a temporary unavailable window for readers.

@iambriccardo iambriccardo marked this pull request as ready for review May 22, 2026 12:50
@iambriccardo iambriccardo requested a review from a team as a code owner May 22, 2026 12:50
@iambriccardo iambriccardo enabled auto-merge (squash) May 22, 2026 13:00
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