Skip to main content

No project description provided

Project description

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

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.5.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

table2sql-1.0.5-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page