Skip to main content

table2sql

CI Quality Gate Status codecov CodeQL

PyPI version

Python CLI tool which allows you to convert file with table (CSV and Excel) to SQL insert statements.

Docs

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)

Source distribution for table2sql 1.0.5
File Size Uploaded
table2sql-1.0.5.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for table2sql 1.0.5
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page