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
Release files for table2sql 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| table2sql-1.0.5.tar.gz | 4.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| table2sql-1.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.3 kB
Release files / table2sql-1.0.5.tar.gz
| Download URL | table2sql-1.0.5.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec936816ab3a25ab641bca6c7b64d6fe55a5266345831dd7dcc98c447db74f9b
|
|
BLAKE2b-256 checksum How to use checksums |
71acceba03953269d02d20cc7974c4eac4a33da129ef147c1e5b1684225d6205
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0a2 CPython/3.8.12 Linux/5.13.0-1025-azure
|
Release files / table2sql-1.0.5-py3-none-any.whl
| Download URL | table2sql-1.0.5-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
42190e2491ba53739e7eedcc1d0c8cb04d7e581c938f55c5ce67e446292027ea
|
|
BLAKE2b-256 checksum How to use checksums |
70b5318b226a5bb8745860e5f41aff402dba2888aacbec640b615cc9c91e56ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0a2 CPython/3.8.12 Linux/5.13.0-1025-azure
|