Can I use one schema to validate multiple csv files? #637
-
is there a way to override path in the yaml? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
tagging @roll to take a look :-) |
Beta Was this translation helpful? Give feedback.
-
Yes, using the Table Schema: $ frictionless describe --type schema table.csv > schema.yaml
$ frictionless validate --schema schema.yaml <any-similiar-table>.csv |
Beta Was this translation helpful? Give feedback.
-
You can also reference the same schema in several resources of a data package, For a working example, see okfn/publicbodies. In {
"path": "data/br.csv",
"profile": "tabular-data-resource",
"name": "br",
"format": "csv",
"mediatype": "text/csv",
"schema": "public-body-schema.json"
},
{
"path": "data/ch.csv",
"profile": "tabular-data-resource",
"name": "ch",
"format": "csv",
"mediatype": "text/csv",
"schema": "public-body-schema.json"
}, and the actual schema is on |
Beta Was this translation helpful? Give feedback.
You can also reference the same schema in several resources of a data package,
For a working example, see okfn/publicbodies.
In
datapackage.json
, we reference the schema file several times:and the actual schema is on
public-body-schema.json
.