When I run dbt test, I get the following error:
('42000', '[42000] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Create View or Function failed because no column name was specified for column 1. (4511) (SQLMoreResults)')
The compiled SQL is
select
1
from (select * from MyTable where OtherColumn is null or OtherColumn = 0) dbt_subquery
where not(MyColumn != 'Opt1')
which, when run, is created as a view. SQL Server does not support unnamed columns in views, so this fails.
For reference, the following dispatch configuration is in my dbt_project.yml
Is this a bug, or am I doing something wrong? It seems there is no expression_is_true macro in tsql-utils for dbt_utils, but I may be understanding the dispatch flow incorrectly. Thanks!
I have dbt_utils and tsql_utils installed.
On one of my model's columns, I have the following test:
When I run
dbt test
, I get the following error:('42000', '[42000] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Create View or Function failed because no column name was specified for column 1. (4511) (SQLMoreResults)')
The compiled SQL is
which, when run, is created as a view. SQL Server does not support unnamed columns in views, so this fails.
For reference, the following dispatch configuration is in my
dbt_project.yml
Is this a bug, or am I doing something wrong? It seems there is no expression_is_true macro in tsql-utils for dbt_utils, but I may be understanding the dispatch flow incorrectly. Thanks!