-
Notifications
You must be signed in to change notification settings - Fork 102
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
alter_column_type - Not working for column change #152
Comments
@visch do you think this might be related to microsoft/dbt-synapse#63? I almost wonder if there's an issue with |
Dove in Seems to be where the SQL is coming from. The sql for mssql I'm not certain that you actually want to cascade on delete, but this seems to be the syntax issue. It looks like that's the syntax most warehouses use. See https://docs.aws.amazon.com/redshift/latest/dg/r_ALTER_TABLE.html vs https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-table-table-constraint-transact-sql?view=sql-server-ver15 The fix in https://github.com/dbt-msft/dbt-synapse/pull/64/files looks like it's be valid for MSSQL as well, might be worth putting it in this repo instead of synapse's 🤷 |
short answer, yes :D |
so looking at things. it seems the dbt-sqlserver is making use of the dbt-core's default__alter_column_type macro, which it shouldn't be. So the addition of |
@swanderz yep that makes sense, should I rename the macro and make a PR to dbt-sqlserver instead? |
that'd be great -- thanks @dlarsen5! |
@dlarsen5 friendly bump. I hope to release dbt-sqlserver and dbt-synapse v0.21.0 soon. if you don't have a chance to do this in the next week, I'll just copy your logic from your old PR into this one. |
@swanderz pushed a MR but I don't have a local sqlserver to test the changes against so not sure if it works/fixes the incremental issue for synapse |
To replicate setup an incremental model.
For 1. above
For 3. above
The text was updated successfully, but these errors were encountered: