-
Notifications
You must be signed in to change notification settings - Fork 98
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
Issue #127 - Respect SQL Servers Parameter Limit #151
Conversation
The AzureSQL test failed with an error message suggesting that the test harness is at fault.
|
@dbt-msft/dbt-sqlserver-core Any chance we can get the credentials updated for Azure? |
done! |
@jacobm001 thanks for closing out #127 for us. You'll have made @hz-lschick's day I'm sure. The logic is great -- my only comment is that currently this won't affect end users, unless they are working off this adapter directly and modify the {% macro sqlserver__load_csv_rows(model, agate_table) %}
{{ return(sqlserver__basic_load_csv_rows(model, 200, agate_table) )}}
{% endmacro %} I propose doing two things:
# dbt_project.yml
vars:
max_batch_size: 400 # or whatever they want?
|
I agree. I actually left it this way because I thought we might want to make this available to users, but wasn't sure how the rest of the team felt about it. I've added the logic and set the default to 400 as suggested. |
Sorry for the last final push. I realized that now this is configurable we needed some documentation. |
@jacobm001 no worries! My last ask is that you edit the |
@swanderz: I think it makes more sense to merge this in and then have you make the alteration to the changelog in the 0.20.0 PR you have going. There's no way for me to edit the changelog without creating a conflict... I could merge your branch into mine, but that feels rather messy... Happy to write you the text here if that helps. |
I'll handle to weirdness -- don't worry! just make your changes in this branch, and I'll handle it after. Thanks again for your contribution -- glad to have us all on the same "team" now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks again @jacobm001!
Fixes: #127
Changes
batch_size
parameter is nowmax_batch_size
in the macrosqlserver__basic_load_csv_rows()
calc_batch_size()
will now return themax_batch_size
if it won't exceed SQL Server's parameter limit. Otherwise it returns the maximum size that can run without erroring.