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

Dolt import should cast float strings that can be rounded to ints #797

Closed
oscarbatori opened this issue Jul 14, 2020 · 1 comment
Closed
Labels
bug Something isn't working good first issue Good for newcomers
Projects

Comments

@oscarbatori
Copy link
Contributor

oscarbatori commented Jul 14, 2020

doltpy.core.dolt.DoltException: (['dolt', 'table', 'import', 'zip_county', '--pk=year,month,zip,county', '-u', '/var/folders/86/pvj3p5x12j1bzm740hrs45r00000gp/T/tmpjlf1r5pt.csv'], b'Rows Processed: 0, Additions: 0, Modifications: 0, Had No Effect: 0', b'\nA bad row was encountered while moving data.\nBad Row:zip:"501.0" | county:"36103.0" | res_ratio:"0.0" | bus_ratio:"1.0" | oth_ratio:"0.0" | tot_ratio:"1.0" | month:"3" | year:"2020"\nunable to cast "501.0" of type string to int64\nThese can be ignored using the \'--continue\'\n', 1)
@oscarbatori oscarbatori added the bug Something isn't working label Jul 14, 2020
@zachmu zachmu added the good first issue Good for newcomers label Aug 10, 2021
@zachmu
Copy link
Member

zachmu commented Aug 10, 2021

The example above uses doltpy, so the error message will be different from the command line.

The set up is:

  • Create a table with integer columns
  • Create a CSV file with round float values, e.g. 1.0, -100.0
  • Should import successful via dolt table import -u newTable myfile.csv

Needs a bats test for the same functionality.

@zachmu zachmu closed this as completed Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
No open projects
Dolt
  
Awaiting triage
Development

No branches or pull requests

2 participants