8000 GitHub - atao/csv2db: ๐Ÿ“‹ Convert CSV to SQLite Database.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

atao/csv2db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

csv2db

๐Ÿ“‹ Convert CSV to SQLite Database.

Purpose

Easily transform a csv file into a SQLite database.

Requirements

pip install -r requirements.txt

Usage and options

Usage: csv2db.py [OPTIONS]

Options:
  --version                  Show the version and exit.
  -i, --csvfile TEXT         CSV file  [required]
  -sep, --separator TEXT     CSV field separator.  [default: ;]
  -chk, --chunksize INTEGER  Number of rows per chunk to process.  [default:
                             10000]
  -d, --database TEXT        Database name.  [default: database.db]
  -t, --table-name TEXT      Table name.  [default: data]
  -idx, --include-index      Include index in SQLite Database.
  -v, --verbose              Verbose mode.
  -h, --help                 Show this message and exit.

Quickstart

Just run for example :

(.venv) ME > python .\csv2db.py -i .\adresses-31.csv -sep ";" -chk 10000 -d 31 -idx -v

Output :

[+] Importing .\adresses-31.csv into SQLite database 31.db
[+] 10000 rows added to the database
[+] 10000 rows added to the database
...
[+] 10000 rows added to the database
[+] 5214 rows added to the database
[+] CSV data import process completed.

About

๐Ÿ“‹ Convert CSV to SQLite Database.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0