Closed derik-roby closed 1 year ago
@derik-roby thanks for the report!
First, have you installed the tsql-utils
shim package? If not, can you try it out?
We have an override for dbt_utils.depuplicate, sqlserver__deduplicate
which overrides the standard version, default__dededuplicate
. The default__
version has a WITH
but ours doesn't.
In the meantime, please get everyone you know to upvote this Azure SQL Feedback item: support nested WITH
statements
@dataders thanks for the reply. I will try working with tsql-utils and get the nested WITH feedback item upvoted by my colleagues.
@dataders Do you know if dbt-msft is compactible with dbt-project-evaluator package?
While using
dbt_utils.deduplicate
inside a CTE, the dbt compiler creates code that has nested CTE which then throws a compilation error while running.How to reproduce, I am creating a model that references another model:
stg_dim_listings
My Code:
dbt generated code from complied folder:
From my understanding, nested WITH is not allowed in sql server. Kindly correct me if I am wrong in my analysis.