MySQL dump to CSV conversion
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


MySQL dump to CSV conversion


(z)cat dump.sql(.gz) | > dump.csv

First line will be a comment with the header from the table definition. Subsequent lines will be the actual entries

This assumes a single table per sql dump. The entire file will be snarfed from STDIN before processing CREATE TABLE will be a multi-line affair INSERT INTO table will be on a single (long) line, possibly multiple of these lines per dump file.

Setting it up to work with streaming data would take a little bit of work.