-
Notifications
You must be signed in to change notification settings - Fork 104
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
"Error 8115 Arithmetic overflow error converting nvarchar to data type numeric" when seeding a numeric column with some empty rows and specifying column_types #425
Comments
What happens for |
|
Okay, those were worth a try to rule some things out. Since "" also doesn't work in SQL Server, albeit with a different error code, I don't think this is an issue with the dbt-sqlserver python package. I have 0 authority or leadership related to this repo, but personally I would close this issue. That said, here's the next steps I'd propose for your troubleshooting:
Once you figure it out, if there's something that could change in this package then it's totally worth opening a new issue with a feature request(or bug fix, I could be wrong). I'm curious for myself now, so note you should be able to leave a comment on a closed issue to keep all the knowledge in one place(the closing would just help with triage). |
Thanks for the list. Those are good ideas to try.
I'll explore the rest. I'm not convinced that this should be closed, because I'm not convinced this is user error. The issue is not yet reproducible in SQL Server, and the behavior changes not from the seed values but from the dbt configuration of SQL Server data types. Seems like something is happening between reading the CSV and the application of the |
Ah ha! I was wrong. Definitely needs this issue open to address the |
I'm running the following:
I'm seeing some strange behavior around seeding numeric columns with some null values, where the column type is specified in column_types. Here's a minimum reproducible example:
In
seeds/foo.csv
:In
seeds/properties.yml
Run
dbt seed
Here's what I've found so far:
column_types
is not specified, then there is no error, and the inferred data type isint
.select cast('' as numeric(18, 0))
in my SQL Server instance, the error returned is 8114, "Error converting data type varchar to numeric."I've been digging through macros and agate methods, but I'm at a loss. I'm happy to keep investigating, but I'm in need of pointers in the right direction.
The text was updated successfully, but these errors were encountered: