el1xr_opt.Modules.oM_CsvToDuckDB

el1xr_opt.Modules.oM_CsvToDuckDB#

Convert a CSV case folder into a single <case>.duckdb file.

The DuckDB file holds the same tables as the CSV folder and can be fed to the model in place of the folder. Use it from the command line:

el1xr-csv2duckdb –dir data/EEM26 –case Home1

which writes data/EEM26/Home1.duckdb. Reading it back through the model produces the same results as reading the CSV folder.

el1xr_opt.Modules.oM_CsvToDuckDB.csv_case_to_duckdb(dir_name, case_name, db_path=None, overwrite=True)[source]#

Write <dir_name>/<case_name>.duckdb from the CSV case folder. Returns the path.

Return type:

str

Parameters:
  • dir_name (str)

  • case_name (str)

  • db_path (str | None)

  • overwrite (bool)

el1xr_opt.Modules.oM_CsvToDuckDB.main(argv=None)[source]#
Return type:

None