Tuesday, September 16, 2014

nice unix filter pv

I search some filter, that can count a processed rows and can to show a progress. It exists and it is pv

# import to vertica
zcat data.sql | pv -s 16986105538 -p -t -r | vsql

0:13:56 [4.22MB/s] [==============>                                                                                               ] 14%

More http://linux.die.net/man/1/pv

I used it for import PostgreSQL dump file to Vertica
cat data2.sql | sed "s/FROM stdin/FROM LOCAL stdin DIRECT DELIMITER E'\\\t'/g" | pv -t -p -a -b -s 125494564903 | vsql


Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

<< Home