-
Notifications
You must be signed in to change notification settings - Fork 113
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
[BUG] Concat should be replaced with concat_ws in sqlserver from dbtVault version 0.9.1 onwards (version 0.9.0 is working and older ones) #188
Comments
Hi! Thanks for this. We originally implemented the Saying this, I completely agree it should still be used where supported, and the limitations on other platforms with the regular We shall add this to the backlog and get it out in a release soon. Thank you |
Is there anyway to get this implemented? I'm not able to upgrade to automaDV versions at all. I have to use dbtvault 0.9.0 with our sqlserver implementtion because of the limit of 254 catenation strings. |
Hello! We've implemented and tested this and it'll be in the next release (this week!). My only advice would be that even though this fixes it, consider reviewing your model or splitting your satellites a bit more - hundreds of columns in a hashdiff or a primary key is a sign of an incorrect data model and/or a very overloaded satellite. Thanks for your patience on this one! |
Describe the bug
From version 0.9.1 concat_ws is replaced with concat in hashed views in sqlserver. It gives an error: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The concat function requires 2 to 254 arguments.
Environment
dbt version: dbt-core 1.3.3, dbt-sqlserver 1.3.1
dbtvault version: >= 0.9.1
Database/Platform: Microsoft SQL Server Standard (64-bit) 15.0.2101.7, Debian 5.10.127-2 (2022-07-23) x86_64, Python 3.9.2
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Concat should be replaced with concat_ws to support more than 254 concanated fields
Screenshots
Log files
In progress or failed ('42000', '[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The concat function requires 2 to 254 arguments. (189) (SQLMoreResults)')
Additional context
https://github.com/Datavault-UK/dbtvault/blob/master/macros/internal/metadata_processing/concat_ws.sql
Concat_ws has been in SQL Server 2017 (14.x) and later versions
https://learn.microsoft.com/en-us/sql/t-sql/functions/concat-ws-transact-sql?view=sql-server-ver16
AB#5364
The text was updated successfully, but these errors were encountered: