Skip to content

Conversation

@ndwhelan
Copy link

@ndwhelan ndwhelan commented Apr 20, 2018

Adding a feature to allow specifying an output directory, allowing for each table to have its rows in its own file.

Adds optional first parameter --out-dir=. Example usage, which has been added to the README, would be like this:

zcat dumbfile.sql.gz | python mysqldump_to_csv.py --out-dir=./output

OR

python mysqldump_to_csv.py --out-dir=./output ./sql/mysql_dump1.sql ./sql/mysql_dump2.sql

So, if the SQL dumps insert data into the tables users and groups, and --out-dir=./output is specified, two files will contain the data, ./output/users.csv and ./output/groups.csv, respectively.

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

Successfully merging this pull request may close these issues.

2 participants