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 qsv/scripts/NYC_311_SR_2010-2020-sample-1M.csv.schema.json Lines 30 to 67 in 1efa6b5 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:
qsv/scripts/benchmark_data-dynenum.csv.schema.json
Lines 32 to 40 in 8ded63a
https://github.com/jqnatividad/qsv/blob/master/scripts/NYC_agencies.csv
Contrast that with using hardcoded enums:
qsv/scripts/NYC_311_SR_2010-2020-sample-1M.csv.schema.json
Lines 30 to 67 in 8ded63a