Skip to content

Commit 0b828b1

Browse files
committed
fix calc_batch_size #407
1 parent 9546c40 commit 0b828b1

File tree

1 file changed

+2
-2
lines changed
  • dbt/include/sqlserver/macros/materializations/seeds

1 file changed

+2
-2
lines changed

dbt/include/sqlserver/macros/materializations/seeds/helpers.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88

99
{% macro calc_batch_size(num_columns) %}
1010
{#
11-
SQL Server allows for a max of 2100 parameters in a single statement.
11+
SQL Server allows for a max of 2098 parameters in a single statement.
1212
Check if the max_batch_size fits with the number of columns, otherwise
1313
reduce the batch size so it fits.
1414
#}
1515
{% set max_batch_size = get_batch_size() %}
16-
{% set calculated_batch = (2100 / num_columns)|int %}
16+
{% set calculated_batch = (2098 / num_columns)|int %}
1717
{% set batch_size = [max_batch_size, calculated_batch] | min %}
1818

1919
{{ return(batch_size) }}

0 commit comments

Comments
 (0)