You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues, and I could not find an existing issue for this feature
I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion
Describe the feature
When a table is reset it executes a DROP TABLE CASCADE that also drops any downstream views that depend on the table. When the DBT graph is large and concurrency is limited, this can cause periods of time where the table has been reset but the view on top of it does not exist.
Take an example of concurrency of 1 with TableA, ViewA, and TableB, where ViewA references TableA. If the order is
TableA
ViewA
TableB
Then you will not have any issues. If instead the order is
TableA
TableB
ViewA
ViewA is not populated until TableB is completed. If TableB takes a long time to materialize, then ViewA will not be present for that period. This causes problems for downstream consumers that depend on those views existing.
I'd like (either by default or configuration) to favor the creation of views before tables all dependencies being equal.
Describe alternatives you've considered
None that I can think of. I would love if this already existed and just isn't documented clearly somewhere in the DBT docs.
Who will this benefit?
This will benefit users that operate in non data warehouse environments that have constrained concurrency and large numbers of models to evaluate. In general it will reduce the downstream impact on consumers that depend on views in order to query data sources.
Are you interested in contributing this feature?
I can, but wouldn't know where to start.
Anything else?
No response
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
[Feature] Prioritize view creation before table materialization
[CT-3433] [Feature] Prioritize view creation before table materialization
Nov 29, 2023
Using a blue/green deployment using dbt clone wouldn't help in this case because cloning in dbt-postgres relies on views, so we'd just run into the same problem as above.
Our recommendation
In Postgres, use tables (rather than views) for any data sets that are exposed to consumers
Summary
Since this is primarily driven by the design choices of Postgres and we don't plan on implementing work-arounds, I'm going to close this as "not planned".
Is this your first time submitting a feature request?
Describe the feature
When a table is reset it executes a DROP TABLE CASCADE that also drops any downstream views that depend on the table. When the DBT graph is large and concurrency is limited, this can cause periods of time where the table has been reset but the view on top of it does not exist.
Take an example of concurrency of 1 with TableA, ViewA, and TableB, where ViewA references TableA. If the order is
Then you will not have any issues. If instead the order is
ViewA is not populated until TableB is completed. If TableB takes a long time to materialize, then ViewA will not be present for that period. This causes problems for downstream consumers that depend on those views existing.
I'd like (either by default or configuration) to favor the creation of views before tables all dependencies being equal.
Describe alternatives you've considered
None that I can think of. I would love if this already existed and just isn't documented clearly somewhere in the DBT docs.
Who will this benefit?
This will benefit users that operate in non data warehouse environments that have constrained concurrency and large numbers of models to evaluate. In general it will reduce the downstream impact on consumers that depend on views in order to query data sources.
Are you interested in contributing this feature?
I can, but wouldn't know where to start.
Anything else?
No response
The text was updated successfully, but these errors were encountered: