referential integrity checks? #1872
-
If I have one CSV that includes a I can do that as a one-off check with |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
You can use it to ensure that all fields in the csv file are of the correct type, within specified ranges, or match certain patterns. Although you can try creating a JSON Schema file from jurisdictions.csv file using the See https://github.com/jqnatividad/qsv/blob/master/src/cmd/validate.rs#L2 |
Beta Was this translation helpful? Give feedback.
-
The Just start with a "training" CSV to run the If the I have an extended example at https://github.com/dathere/qsv-lookup-tables. |
Beta Was this translation helpful? Give feedback.
-
Now that the Though I'm sure we can have a full-blown WDYT? |
Beta Was this translation helpful? Give feedback.
validate
now supports thedynenum
custom keyword for validating against a local CSV or on a URL (http/https schemes supported). 😄#2166
For an example, see:
https://github.com/jqnatividad/qsv/blob/8ded63a0356c92b73fcce786d7364cf5bab7ebaa/scripts/benchmark_data-dynenum.csv.schema.json#L32-L40
https://github.com/jqnatividad/qsv/blob/master/scripts/NYC_agencies.csv
Contrast that with using hardcoded enums:
https://github.com/jqnatividad/qsv/blob/8ded63a0356c92b73fcce786d7364cf5bab7ebaa/scripts/NYC_311_SR_2010-2020-sample-1M.csv.schema.json#L30-L67