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
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:
Dbt run
See error
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)')
koillinengit
changed the title
[BUG] <my bug title>
[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)
Apr 11, 2023
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.
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: