-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incremental does not work with unique_key that is array #241
Comments
This fixes it: File: dbt/include/sqlserver/macros/materializations/models/incremental/merge.sql
|
@johnnytang24 Thanks for immediately providing us with the fix! Could you quickly also give me the output of |
|
While going through the dbt docs, I could not find any documented behaviour where you can use an array as the unique key. All examples point to SQL columns or expressions. The There it says you can use an expression to combine multiple columns. However... when you take a look at the core used in dbt-core it does seem to support sequences so I'd say we have to do the same here. I'll do the fix in this project and create an issue for the dbt documentation. |
@johnnytang24 Fix is ready in pr #251, care to review? |
Looks good! |
Example model:
Error: ('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near 'using'. (102) (SQLExecDirectW);
Code generated in run/project/model:
DELETE FROM ... USING is not supported by SQL Server
The text was updated successfully, but these errors were encountered: