Closed koillinengit closed 3 weeks ago
Hi! Thanks for this.
We originally implemented the concat
macro using concant_ws
, however we had issues with consistency across platforms, as not all platforms have concat_ws
available.
Saying this, I completely agree it should still be used where supported, and the limitations on other platforms with the regular concat
documented in our docs. The downside is inconsistency across platforms, however, I think this is better than the alternative of the dbtvault concat macro not working at all for large concatenations on some platforms.
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.
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!
Fixed and released in v0.11.0, Thank you for your patience on this one!
If the issue persists, please re-open this issue.
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