Tool for conversion of MySQL dumps to TSV format
Project description
About
This module provides the mysqltotsv.Splitter class and a CLI tool to allow conversion of large MySQL dumps to the TSV format.
The module assumes the MySQL dump to be encoded in UTF-8 format.
This is primarily intended for large MySQL dumps where opening them with a text editor is impractical and handling them is easier through a tool.
Install
To install from pypi:
pip3 install --user mysqltotsv
Usage
The following command takes a MySQL dump and creates a separate TSV file for each table found inside (the output directory needs to be present):
python3.7 mysql-to-tsv.py --file dump.sql --outdir out1
There is also a switch to only process certain tables and skip the rest. Example:
python3.7 mysql-to-tsv.py --file dump.sql --outdir out1 --table-filter=updates,updates_edited
More details about the CLI switches:
usage: mysql-to-tsv.py [-h] --file FILE --outdir OUTDIR
[--table-filter TABLE_FILTER] [--only-schema]
[--strip-quotes]
Tool for conversion of large MySQL dumps to TSV format
optional arguments:
-h, --help show this help message and exit
--file FILE mysql dump file
--outdir OUTDIR output directory
--table-filter TABLE_FILTER
filtered tables
--only-schema write the schema to the output directory
--strip-quotes strip quotes from values
Support
For questions or requests for paid support, please send an e-mail to business@garage-coding.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mysqltotsv-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11eaf61d25c0989841812e3d07deadc63b35fad9058c81ec2518274a7fb85d39 |
|
MD5 | 4d128bd0ef67e5aea54b485b33cbb8c6 |
|
BLAKE2b-256 | f2f41ded4c49cb503098a25bae1e6e16c1f7ed107e88aaae58894f15ef9ea66a |