Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect parameter for number of columns used in seed batch size #210

Closed
rlshuhart opened this issue Feb 25, 2022 · 1 comment · Fixed by #211
Closed

Incorrect parameter for number of columns used in seed batch size #210

rlshuhart opened this issue Feb 25, 2022 · 1 comment · Fixed by #211

Comments

@rlshuhart
Copy link
Contributor

{% set cols_sql = get_seed_column_quoted_csv(model, agate_table.column_names) %}
{% set batch_size = calc_batch_size(cols_sql|length, max_batch_size) %}

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 added a commit to rlshuhart/dbt-sqlserver that referenced this issue Feb 25, 2022
@sdebruyn sdebruyn linked a pull request May 22, 2022 that will close this issue
@dataders
Copy link
Collaborator

dataders commented Sep 1, 2022

closing in favor of #179

@dataders dataders closed this as completed Sep 1, 2022
sdebruyn pushed a commit to rlshuhart/dbt-sqlserver that referenced this issue May 17, 2023
sdebruyn added a commit that referenced this issue May 17, 2023
Fix #210 - Incorrect variable for calc_batch_size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants