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 bug
Current Behavior
Compiled code: with __dbt_cte_ephemeral_model as ( select * from some_source_model ) with primary_upstream_model as (select * from upstream_model) , ephemeral_model as (select * from __dbt_cte_ephemeral_model) select * from primary_upstream_model
Expected Behavior
Compiled code: with __dbt_cte_ephemeral_model as ( select * from some_source_model ) , primary_upstream_model as (select * from upstream_model) , ephemeral_model as (select * from __dbt_cte_ephemeral_model) select * from primary_upstream_model
Steps To Reproduce
Run this: with primary_upstream_model as (select * from upstream_model) , ephemeral_model as (select * from ephemeral_model) select * from primary_upstream_model
Relevant log output
No response
Environment
- OS:
- Python:
- dbt:
Which database adapter are you using with dbt?
No response
Additional Context
The root seems to be that when DBT compiles an ephemeral model, it should adjust the rest of the model imports to account for the added CTE.
A full refresh should happen whenever a column is added; it also shouldn't fail as an invalid identifier.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
[Bug] Ephemeral model should refresh when a new column is added
[CT-2947] [Bug] Ephemeral model should refresh when a new column is added
Aug 7, 2023
This is resolved - I think Brian opened up an accidental dupe since the customers ticket contained 2 issues (the first of which was this, which is fully resolved, the second of which is regarding contracts and thus has nothing to do with this whatsoever).
Is this a new bug in dbt-core?
Current Behavior
Compiled code:
with __dbt_cte_ephemeral_model as ( select * from some_source_model ) with primary_upstream_model as (select * from upstream_model) , ephemeral_model as (select * from __dbt_cte_ephemeral_model) select * from primary_upstream_model
Expected Behavior
Compiled code:
with __dbt_cte_ephemeral_model as ( select * from some_source_model ) , primary_upstream_model as (select * from upstream_model) , ephemeral_model as (select * from __dbt_cte_ephemeral_model) select * from primary_upstream_model
Steps To Reproduce
Run this:
with primary_upstream_model as (select * from upstream_model) , ephemeral_model as (select * from ephemeral_model) select * from primary_upstream_model
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
No response
Additional Context
The root seems to be that when DBT compiles an ephemeral model, it should adjust the rest of the model imports to account for the added CTE.
A full refresh should happen whenever a column is added; it also shouldn't fail as an invalid identifier.
The text was updated successfully, but these errors were encountered: