dbt-sqlserver icon indicating copy to clipboard operation
dbt-sqlserver copied to clipboard

Incorrect parameter for number of columns used in seed batch size

Open rlshuhart opened this issue 3 years ago • 0 comments

https://github.com/dbt-msft/dbt-sqlserver/blob/3d202ea4172e06233f654667ae92ab4851bcae88/dbt/include/sqlserver/macros/materializations/seeds/helpers.sql#L62-L63

Hi!

I've noticed that in the above cols_sql|length is not actually returning the number of columns. I'm not entirely sure what number is returning, but it is a far larger number, therefore, causing seeds to insert one row at a time for a 55 column csv. When I overwrite "cols_sql|length" with a hardcoded 55 in the source code, the optimal number of rows per binding appears to be inserted within the 2100 parameter limitation. Fortunately, the fix is simple and I'll submit a PR for review.

Thanks!

rlshuhart avatar Feb 25 '22 23:02 rlshuhart