- CSV-SQL will generate SQL table creation statements from CSV files, currently with TEXT data types only.
- CSV-SQL outputs to stdout. You can redirect the output to a file.
- The name of the CSV file will be used as the name of the table.
csv-sql [FILE_PATHS]...
csv-sql --schema-only [FILE_PATHS]...
csv-sql --primary-key=smallint [FILE_PATHS]...
csv-sql --primary-key=integer [FILE_PATHS]...
csv-sql --primary-key=bigint [FILE_PATHS]...
csv-sql --merge [FILE_PATHS]...
csv-sql [FILE_PATHS]... > output.sql
csv-sql --help
Use just for easy development.
just -l
just dev ~/Dir/file.csv
just dev "--schema-only ~/Dir/file.csv ~/Dir/file2.csv ~/Dir/file3.csv"
just clear
- Generate SQL table creation statements from CSV files with headers and TEXT data types
- Output to stdout
- Schema only without inserting data
- merge multiple CSV files into one SQL table
- Automatic data type detection
- Custom data types
- Primary keys
- Auto increment
- Custom
- Constraints
- Foreign keys