We are trying to parse a file and save it in a MySQL database. Teams will import a large trace file, the size can be several gigabytes, so it may be interesting for the user to track the progress of the command. We use the following command:
String commandText = "SET AUTOCOMMIT = 0; "
+ "START TRANSACTION; "
+ "LOAD DATA LOCAL INFILE \'" + filePath + "\' "
+ "INTO TABLE testdatabase.metadata "
+ @"FIELDS TERMINATED BY '\t' "
+ @"LINES TERMINATED BY '\n' "
+ "(Position,"
+ "Timespace,"
+ "Duration,"
+ "Disk,"
+ "Request,"
+ "Sector,"
+ "Length); "
+ "COMMIT;";
Is there a way to track progress during the execution of a command to implement a progress bar?
source
share