ontodev / valve.rs

A lightweight validation engine written in rust.
BSD 3-Clause "New" or "Revised" License
4 stars 0 forks source link

Use column labels when reading and writing TSV files #85

Closed jamesaoverton closed 3 weeks ago

jamesaoverton commented 4 months ago

In the VALVE "column" table we distinguish the column name (in the "column" column) from the column label (in the "label" column). The column name is for SQL and SQLREST parameters. The column label is for display to users, specifically the HTML display of tables in Nanobot, but also the TSV files that VALVE reads and writes.

The column label can be omitted, in which case the column label is just the column name.

Currently, when reading TSV files, VALVE writes the column name, and when reading TSV files VALVE expects the column name, and throws an error if the column label is used (e.g. ConfigError("Column 'penguin.studyName' not in column config") when that is the column label and "study_name" is the column name).

I would like VALVE to use the column label when writing TSV files, and expect the column label when reading them. When reading a file, if the column name is used instead of the column label, it would be good to accept the column name with a warning that the column label should be used.

jamesaoverton commented 4 months ago

This is particularly relevant to the "datatype" table, where I would like to have "sql_type" and "html_type" column names with "SQL type" and "HTML type" column labels, respectively.