How to validate booleans when importing a csv using ChoETL?
I built a tool for users to import CSVs and create custom column mappings for the import. It uses the ChoETL csv tool to parse the CSV. I’m adding some boolean columns and I’m not sure how to validate the data to make sure that the values provided fit the ChoETL default setting, ChoBooleanFormatSpec.ZeroOrOne
.
Ideally, I would want to simply throw an exception (to be returned as a nice message) if the type isn’t correct. But when I tried putting “True” instead of a 1, ChoETL parsed it as false. How can I do this?
According to the documentation you can only choose one supported format.