[Bug] --empty
flag generates SQL that conflicts with subquery aliases
#9967
Labels
bug
Something isn't working
empty
Issues related to the --empty CLI flag
pre-release
Bug not yet in a stable release
Is this a new bug in dbt-core?
Current Behavior
Running
dbt run --empty
generates SQL with a built-in alias like this (introduced here):If the original SQL already contains an alias, this causes a syntax error, e.g. this model:
generates:
Expected Behavior
I expect the
--empty
flag to generate valid subquery SQL that can be aliased for use in other parts of the query.Steps To Reproduce
dbt run --empty
on the modelRelevant log output
No response
Environment
Which database adapter are you using with dbt?
bigquery
Additional Context
No response
The text was updated successfully, but these errors were encountered: