dbt run --empty
throws an error for models with aliased refs
#898
Labels
bug
Something isn't working
dbt run --empty
throws an error for models with aliased refs
#898
Describe the bug
Running
dbt run --empty
fails for any model that has a aliased relation, due to double aliasing on the compiled sql code.Steps To Reproduce
models/aliased_ref_model.sql
:dbt run -s aliased_ref_model --empty
_[PARSE_SYNTAX_ERROR] Syntax error at or near 'AS'. SQLSTATE: 42601
... FROM (select * from
my_catalog
.my_schema
.aliased_ref_model
where false limit 0) dbt_limit_subq_aliased_ref_model AS table1--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------^^^
Expected behavior
Run without error
System information
The output of
dbt --version
:Also fails on dbt-databricks~1.8
The operating system you're using:
MacOS Sequoia 15.2
The output of
python --version
:Python 3.12.7
The text was updated successfully, but these errors were encountered: