Goal
Strengthen validation of CLI arguments and improve error reporting across the insert-tools CLI (mainly clickhouse_insert.cli and runner).
Tasks
- Validate required arguments in one place (e.g.,
host, target_table, select_sql)
- Add checks for missing or conflicting arguments
- Handle errors such as:
- Missing
select_sql value
- Non-existent file if reading SQL from file
- Invalid types (e.g.,
port is not an integer)
- Improve error messages to be more user-friendly
- Add
validate() method inside InsertConfig to encapsulate checks
Why it matters
Current CLI behavior lacks robust validation and gives unclear errors when arguments are missing or misused. Improving this will make the tool easier to use and reduce confusion.
Goal
Strengthen validation of CLI arguments and improve error reporting across the
insert-toolsCLI (mainlyclickhouse_insert.cliandrunner).Tasks
host,target_table,select_sql)select_sqlvalueportis not an integer)validate()method insideInsertConfigto encapsulate checksWhy it matters
Current CLI behavior lacks robust validation and gives unclear errors when arguments are missing or misused. Improving this will make the tool easier to use and reduce confusion.