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

materialized views don't get updated after deploy #5804

Open
BenWu opened this issue Jun 18, 2024 · 3 comments
Open

materialized views don't get updated after deploy #5804

BenWu opened this issue Jun 18, 2024 · 3 comments

Comments

@BenWu
Copy link
Contributor

BenWu commented Jun 18, 2024

With the current bqetl tooling, materialized_view.sql only get deployed once and the definitions don't get updated afterwards unless they're manually deleted.

For example, the currently deployed moz-fx-data-shared-prod.firefox_desktop_derived.event_monitoring_live_v1 has DATE(submission_timestamp) >= "2024-05-22" from when it was created but it should be the current date like in the generated sql

Additionally, materialized views don't get deleted when the materialized_view.sql is deleted. We should update the bqetl deploy code so that the deployed objects match what's in the generated sql.

One thing to be careful of is potential costs with recreating a materialized view frequently which might be more expensive than the incremental updates. We should see if it this is relevant for any of the existing views and make sure any generated materialized views have deterministic output.

┆Issue is synchronized with this Jira Task

@BenWu
Copy link
Contributor Author

BenWu commented Jun 18, 2024

Also if this is done, some currently deployed materialized views might suddenly change so we should check the impact of that

@BenWu
Copy link
Contributor Author

BenWu commented Jun 20, 2024

Looks to be fixed by #5640. One thing I just noticed is the most recent merge to main had a dry run failure because a materialized view wasn't found due to being recreated at the same time: https://app.circleci.com/pipelines/github/mozilla/bigquery-etl/36163/workflows/7e17f954-5b8d-4d9d-bbc0-46a7a19ca6a7/jobs/407245/parallel-runs/0

I created #5817 to track this

@BenWu BenWu closed this as completed Jun 20, 2024
@BenWu
Copy link
Contributor Author

BenWu commented Oct 28, 2024

#5640 was reverted with #5826

@BenWu BenWu reopened this Oct 28, 2024
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

No branches or pull requests

1 participant