-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
CSV import with multiple files prompts "There is already a table of that name..." for every one #1121
Comments
As an aside, trying to open the database when a matching The error message seems a bit misleading. A user likely wouldn't know "why is this database read only? How do I fix it?" from that. Looking at the file permissions (on this Linux system), the file wasn't read only. After just deleting the -journal file, the database then opened. We should probably figure out a more helpful approach for this situation. 😄 |
Agreed, this is sane behavior before batch so old assumptions.. but a Yes for all button would be nice. (Currently swamped with investor demo crap) but should be a quickie this weekend, Sunday the latest. |
@iKlsR Awesome. 😄 |
Add a 'Yes for all' button to the "There is already a table of that name..." message box in the Import CSV dialog. See issue #1121.
@justinclift Just pushed a commit which adds a 'Yes for all' button to that message box. Can you check if that's good enough for your use case? 😄 |
Thanks @MKleusberg. Yep, it's "good enough". As a data point, the crash can still be triggered by pressing a key while this is happening. Not sure if that was looked at in the commit (haven't eyeballed the commit code yet). In case it's useful, the data set I'm testing it with is this: https://f001.backblaze.com/file/Backblaze-Hard-Drive-Data/data_2013.zip That's a ~80MB zip file, filled with a bunch of csv's. Makes for a really good use case for this. 😄 |
Hmm... if you're up for being a perfectionist about the dialog, maybe check if the table already exists before doing the first import? If it doesn't already exist, then automatically set |
Ah good idea. I'm not 100% sure how to best implement this but I've just pushed a commit that, to me, feels like a good approach for this. It also distinguishes between different table names now. I haven't yet investigated the crash issue. I'll leave that for issue #1072 😃 |
Cool! Testing it now, it's working really well. 😀 As a data point, that slowdown over time isn't happening. Looks like it's related to having separate tables so doesn't occur when it's all going into just the one. Just realised we're also missing a Cancel button for this "There is already a table named ..." dialog. At the moment there's no way for the user to go "Oops, wrong table name. I need to cancel out". 😄 |
The cancel button was a bit trickier but should be working now as well 😄 |
Yep, it's all working really well now. Thanks @MKleusberg, well done. 😄 |
Cool, thanks 😃 |
Just went to test the new and improved CSV import code (6432517) with a bulk import of many files (366) from the Backblaze drive stats data release.
The table structure is prepopulated, to ensure the fields have the correct data type.
Steps followed:
drive stats
The import then begins, displaying the "Decoding..." dialog. After the decode finishes, a dialog appears asking:
Clicked "Yes", after which the insert happens, then a new "Decoding..." dialog appears. And the "There is already a table of that name..." dialog appears again.
It seems like this would pop up all 366 times, so I clicked No, and then Cancel to stop the process. DB4S crashed (leaving a -journal file behind) too. Oops.
The "There is already a table..." dialog should probably appear before the first decoding step, and the answer to that be kept for all of the imported CSV's so it doesn't hassle the user who does want all of them in the existing table. 😄
The text was updated successfully, but these errors were encountered: