jamesmishra / mysqldump-to-csv

A quickly-hacked-together Python script to turn mysqldump files to CSV files. Optimized for Wikipedia database dumps.
MIT License
327 stars 127 forks source link

Add optional command line argument for ignoring specific columns #12

Closed nkruglikov closed 3 years ago

nkruglikov commented 7 years ago

Hi!

Nice script you've got here. I am playing with Wikipedia at the moment and it really helps. However, there is a problem with dumps which contain a binary field. For example, if you try to convert categorylinks table dump to CSV and feed the resulting CSV to Pandas, Pandas will stumble into cl_sortkey field and die. So I thought it would be useful to have an opportunity to ignore such columns, and added an optional argument for it.

This argument does not break the current argument structure. All previous use-cases are still valid, including the one with reading from stdin.

I've also described the new argument in README.md. Feel free to correct my language.