Skip to content
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

Perhaps documentation on how to name the file #6

Open
nareshshah139 opened this issue Dec 20, 2015 · 3 comments
Open

Perhaps documentation on how to name the file #6

nareshshah139 opened this issue Dec 20, 2015 · 3 comments

Comments

@nareshshah139
Copy link

Documentation on how the output is stored would be useful

@sergeiwallace
Copy link

I agree. It appears that the csv format is just output to the terminal? So you would have to pipe it into a csv file upon conversion?

@Try431
Copy link

Try431 commented Mar 7, 2018

Seems like this has been answered under the Usage section of the README (emphasis is mine):

Just run python mysqldump_to_csv.py followed by the filename of an SQL file. You can specify multiple SQL files, and they will all be concatenated into one CSV file. This script can also take in SQL files from standard input, which can be useful for turning a gzipped MySQL dump into a CSV file without uncompressing the MySQL dump.

zcat dumpfile.sql.gz | python mysqldump_to_csv.py

@francesco1119
Copy link

francesco1119 commented Nov 3, 2018

... so please change:

zcat dumpfile.sql.gz | python mysqldump_to_csv.py

to:

zcat dumpfile.sql.gz | python mysqldump_to_csv.py > output.csv

Or if you want to be cool, add a progress bar to your work:

  1. install pv: apt-get install pv
  2. run: pv dumpfile.sql.gz | zcat | python mysqldump_to_csv.py > output.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants