It seems an compilation error has been introduced since dbt-sqlserver 1.9.0 causing errors at runtime:
with source as (
select *
from {{ source('example', 'example') }}
)
, generated_primary_key as (
select
{{ dbt_utils.generate_surrogate_key(["id", "date"]) }} primary_key
, *
from source
)
, destination as (
{{ dbt_utils.deduplicate(
relation='generated_primary_key',
partition_by='primary_key',
order_by='last_updated desc'
)
}}
)
select * from destination
Causing the following error at runtime:
13:47:26 Failure in model exampl (models/staging/example.sql)
13:47:26 ('42000', "[42000] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Incorrect syntax near 'natural'. (102) (SQLMoreResults)")
It seems an compilation error has been introduced since dbt-sqlserver 1.9.0 causing errors at runtime:
Causing the following error at runtime: