Convert a CSVW document (CSV metadata) to a DuckDB query to load a CSV file into a database.
See also: Python csvw package.
pip install csvw-duckdb
To use this tool, call it from the command line and provide the path of the CSVW document. The SQL code will be written to the screen.
csvw-duckdb --help
usage: csvw-duckdb [-h] [--loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [--version] csvw_path
Load a CSVW document and generate simple SQL SELECT statements. One SQL file will be generated per table in the CSVW table group.
positional arguments:
csvw_path CSVW file
options:
-h, --help show this help message and exit
--loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}, -l {DEBUG,INFO,WARNING,ERROR,CRITICAL}
--version show program's version number and exi
csvw-duckdb my_metadata.csvw