We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9546c40 commit 0b828b1Copy full SHA for 0b828b1
dbt/include/sqlserver/macros/materializations/seeds/helpers.sql
@@ -8,12 +8,12 @@
8
9
{% macro calc_batch_size(num_columns) %}
10
{#
11
- SQL Server allows for a max of 2100 parameters in a single statement.
+ SQL Server allows for a max of 2098 parameters in a single statement.
12
Check if the max_batch_size fits with the number of columns, otherwise
13
reduce the batch size so it fits.
14
#}
15
{% set max_batch_size = get_batch_size() %}
16
- {% set calculated_batch = (2100 / num_columns)|int %}
+ {% set calculated_batch = (2098 / num_columns)|int %}
17
{% set batch_size = [max_batch_size, calculated_batch] | min %}
18
19
{{ return(batch_size) }}
0 commit comments