The goal of this project is to create a utility that reads a single file or a directory of csv files to create and load a database and eventually code around the database.
The db
sub-command parses the files, creates a database table for each file it parses, and loads the database.
Currently, SQLite
, Postgres
, and MySQL/MariaDB
are supported.
csv-to-db 0.5.0
creates and loads a database from CSV file(s)
USAGE:
csv-to db [FLAGS] [OPTIONS] --connection-info <connection_info> --type <db_type> --name <name>
FLAGS:
--drop-stores Drops tables/collections if the already exist
-h, --help Prints help information
--no-headers The CSV file(s) have no column headers
-s, --save-cache Stores the meta data about each input's column data definitions
-V, --version Prints version information
OPTIONS:
-c, --connection-info <connection_info> Database connectivity information
-t, --type <db_type> The type of database to create, valid types are sqlite, postgres, and
mysql
-d, --directories <directories>... The directories that contain CSV files to be processed, a comma delimited
string of paths
-e, --extension <extension> the file extension for the CSV files to be parsed [default: csv]
-f, --files <files>... The CSV files to be processed, can be /path/to/files/ or a comma
delimited string of paths
-n, --name <name> Name of the database to be created
-o, --one-table <one_table> Store the parsed data in a single table with the name given here
This sub-command will create a new db and code to read data from the database. After running this command you'll have a new database, code to access and run queries against the database along with models that, well model, the data. Planned languages for generated code are Rust, Go, and C#.
This sub-command will execute the two commands above and then generate a GET route for each table, returning paged response. The API will be generated in Rust, Go, and C#.
If there is a database or language you'd like to have support for open an issue with the your suggestion.