Command Line Interface¶
files2db is a python package providing a cli interface as follow:
# Get help
files2db --help
# Use one file with all tables
files2db --path-orga path/to/orga.{csv,xlsx} \
--output-dir results \
--output-prefix normalized_data \
--normalize
# Give each table separately
files2db --path-files path/to/files.csv \
--path-fields-rules path/to/fields_rules.csv \
--path-values-map path/to/values_map.csv \
--output-dir results \
--output-prefix normalized_data \
--normalize
You can provide the 3 tables necessary in two ways:
- use
--path-orgawith one file, either a.xlsxwithFiles,FieldsRulesandValuesMapsheets, or a.csvwithfile,path,sepcolumns giving the path to the three tables. - use
--path-files,--path-fields-rulesand--path-values-mapto provide each table separately.
files2db will then normalize the data and output the resulting database in results/normalize_data{,_errors}.csv.
You can also choose to only concatenate the files without normalizing them by omitting the --normalize flag.