No project description provided
Project description
table2sql
Python CLI tool which allows you to convert file with table (CSV and Excel) to SQL insert statements.
Basic usage
some.csv
a,b,c,d
int,str,float,sql
1,2,3,(SELECT id FROM another.table WHERE name = 'Paul')
5,6,7,(SELECT id FROM another.table WHERE name = 'Paul')
Command:
table2sql some.csv --output-table some.table --has-types-row
Result:
INSERT INTO some.table (a, b, c, d)
VALUES (1, '2', 3.0, (SELECT id FROM another.table WHERE name = 'Paul')), (5, '6', 7.0, (SELECT id FROM another.table WHERE name = 'Paul'));
Install
pip install table2sql
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
table2sql-1.0.1.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for table2sql-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed90dd4d1983f84c36f40775e2f31aaa92d8596a3dc1c5bc84b33fa5e5561034 |
|
MD5 | 014926c30b752215ea19490a865b21e1 |
|
BLAKE2b-256 | b79eaa6772433ce2b31d3758ee0471c39f8be0a68ea87ce1b7a548cdab3e83a9 |