-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Feature request: add a progress bar to dolt sql < file.sql
that shows the progress of a SQL load
#4430
Comments
dolt sql < file.sql
that shows the progress of a SQL load
Hey @societal-sandpaper, thanks for the great feature request; this would definitely improve the import experience when running a batch of commands to import data, such as importing a mysqldump. I believe we already do something similar for We've got an uber-issue that covers better progress reporting more broadly (#4076), so I'll link these together for tracking. I'd like to still leave this one open for now to see if it's something we can get to quickly though (e.g. next couple of weeks). It seems like displaying the extra progress message after the status of each batched command would be fairly straightforward and pretty helpful. |
@jennifersp is on the case! 🎉 |
Hi @societal-sandpaper, thank you for the feature request. |
That makes sense that reading from stdin isn't quite like reading from a normal file pointer. I hadn't considered that complexity. Digging into it, it appears that, at least on dolt v0.50.0, I'll propose the following changes to the
|
Thanks @societal-sandpaper. That all sounds very reasonable to me. @jennifersp – could you add this to your queue for this week? At minimum, we should give the |
Thanks again for the helpful feedback @societal-sandpaper. @jennifersp has updated Please let us know if you have any more feedback for Dolt. We love hearing from customers how we can improve things! |
I'm excited to test this! Thanks for implementing this so fast. |
When running
dolt sql < file.sql
, I wish there was any indication of how far along the operation is. A progress bar, or a message alongside eachQuery OK, 464 rows affected (30.94 sec)
that says something along the lines ofDone line 12/1432
would be helpful.Context
The reason I'm asking for this is because I am migrating some database dumps from other MySQL databases into dolt, and it takes a while to import 10 GB of SQL database dumps. I wish there was a rough progress bar so I could estimate how long each import will take.
Implementation
As far as implementation goes, one way to do this would be to spin up a thread that goes through the input file, counts the number of newline characters, and then stores that number as the denominator of the progress bar. As dolt goes through the import, it can keep track of how many lines of the input file it has parsed, and use that as the numerator of the progress bar.
The text was updated successfully, but these errors were encountered: