-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility of restricting the list of possible values in an "array" type field #627
Comments
Prioritizing this one to unblock Etalab cc @lwinfree |
Hi @johanricher, Could you please try with from pprint import pprint
from frictionless import Resource, Schema, Field
field = Field(name="key", type="array", array_item={"constraints": {"enum": ["a", "b"]}})
resource = Resource([["key"], [["a"]], [["b"]], [["c"]]], schema=Schema(fields=[field]))
pprint(resource.read_rows()) |
Here is details - frictionlessdata/specs#409 (comment) |
Hello @roll But the command line does not seems to work properly when we try to validate a file. Example of schema :
Example of csv file :
Value You have the repo for test here : https://github.com/geoffreyaldebert/schema-test Any idea why this is working on python but not with CLI ? Thanks for your help ! Geoffrey cc @johanricher |
@roll sorry for my latest message, I found the answer. Property Thanks you can keep this issue closed ! cc @johanricher |
Great news @geoffreyaldebert! Thank you so much @roll, we really appreciate it. 👍 |
Great! Thanks. Please create an issue if you run into any troubles using it |
Overview
There is an issue for the specs that can be supported in advance in Frictionless-py as it's blocking for french open data task force Etalab (cc @lwinfree)
frictionlessdata/specs#712
The text was updated successfully, but these errors were encountered: