Skip to content

Commit 20f5f7a

Browse files
committed
corrected mesaging for log
1 parent 0a71e27 commit 20f5f7a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/sqldump/etl/Dump.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ public static void toFile(ResultSet rs, String filename, Boolean append, Log log
8282
fileWriter.flush();
8383
fileWriter.close();
8484

85-
PingPong ping2 = log.info("converting data to CSV (one dot corresponds with 50k lines)");
85+
PingPong ping2 = log.info("converting data to CSV (one dot corresponds with 10k lines)");
8686
List<String> records = new ArrayList<String>();
87+
int counter =0;
8788
while (rs.next()) {
8889

8990
boolean StringType = (meta.getColumnType(1) == java.sql.Types.VARCHAR);
@@ -107,16 +108,16 @@ public static void toFile(ResultSet rs, String filename, Boolean append, Log log
107108
records.add(sbRow.toString());
108109

109110
if (records.size()%10000 == 0) {
111+
counter+=records.size();
110112
System.out.print(".");
111-
PingPong ping3 = log.info("dumping CSV to file ...");
112113
writeBuffered(filename, records, BUFFER_SIZE, true); // always apppend
113114
records = new ArrayList<String>();
114115
sbRow.setLength(0);
115116
}
116117

117118
}
118119
log.finished(ping2);
119-
System.out.print(" (" + records.size() + " entries)");
120+
System.out.print(" (" + counter + " entries)");
120121
if (rs != null) {
121122
rs.close();
122123
}

0 commit comments

Comments
 (0)