-
Notifications
You must be signed in to change notification settings - Fork 0
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
Improve handling of mis-formatted CSVs #67
Comments
A little more info. Using psql in trusted mode yields this:
and in admin mode:
|
The reason for this might be that the table import didn't reach marking the table As suggested, we should remove a partially imported table on import failure as part of this issue. |
By the way, I deleted the corrupted table Taxi from Dashboard, but it did not delete from Metabase. Ah, I'm wrong. It is basically deleted from Metabase, except it is still listed on the home page under the heading "Pick up where you left off", which apparently is a cache of recent work. Other than that, it appears to be gone. It did get removed from Postgres! |
OK, rolling back a partial import is easy and implemented now. I'm scratching my head on how to handle the columns which have misformatted entries beyond the rows looked at by our detection code (I think we've discussed this before for
|
Either we run the detection on the entire file from the start, guaranteeing that all fields have valid values in them, or we process all the rows ourselves and convert invalid values to NULLs / return an exact error with the offending row. |
OK, so I'll merge the rollback part without resolving this issue. Rolling back is the low-hanging fruit, as it prevents the app to go into a split-brain state. Since there are more reasons popping up to consider processing all rows ourselves (like the decimal point problem), let's postpone this issue until we make that decision. |
If you put an invalid entry in a row beyond the scope of our type-detection mechanism (>10000 IIRC), it will not behave nicely.
The example comes from
taxi-one-day.csv
, which has a"\N"
cell for a Real typed column. It gives me:in the console, but nothing useful in the GUI (
Import failed
and an import stuck halfway).The text was updated successfully, but these errors were encountered: