You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When incremental models are dry runned they now check schema type compatibility with a merge statement. If the model SQL uses WITH RECURSIVE then this causes a syntax error because you cannot do:
MERGE INTO `table_ref`AS (
WITH RECURSIVE ...
)
dbt does not have this problem because incremental models run in two stages, insert into _tmp and then merged so the recursive statement only exists with the CREATE OR REPLACE DDL rather than in the MERGE.
I can't see a way around this apart from not running the extra merge statement if WITH RECURSIVE is present in the SQL. You will lose some dry run safety but I think this is ok.
The text was updated successfully, but these errors were encountered:
Context
Caused by #45
When incremental models are dry runned they now check schema type compatibility with a
merge
statement. If the model SQL usesWITH RECURSIVE
then this causes a syntax error because you cannot do:dbt does not have this problem because incremental models run in two stages, insert into
_tmp
and then merged so the recursive statement only exists with theCREATE OR REPLACE
DDL rather than in theMERGE
.I can't see a way around this apart from not running the extra merge statement if
WITH RECURSIVE
is present in the SQL. You will lose some dry run safety but I think this is ok.The text was updated successfully, but these errors were encountered: