-
Notifications
You must be signed in to change notification settings - Fork 28
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
Provide an ability to add custom validation rules? #129
Comments
@am17torres sounds like may be looking for validating foreign keys across data packages. See also https://github.com/frictionlessdata/goodtables-py#advanced-checks |
@am17torres You could also take a look at goodtables family:
PS. |
Thanks for the idea using goodtables I was not aware it existed before now. Unfortunately, that won't work for my use case as the microservice (running node/express) responsible for validating the uploaded CSV will not have public internet access so goodtables.io won't be reachable. I suppose I could, in theory, create a lambda or similar running python which could be reachable from within the private network, but that seems like a lot of extra effort and infrastructure. |
This library is great! It handles a lot of common validation constraints and coverage the vast majority of use cases. I'd really like to use this library but I have a few more complex business requirements for validations that are not covered natively. Before I put together a PR for this, I wanted to get some initial thoughts and feedback.
One such validation requirement is that the fields in a column need to exist in a remote system. I'm sure there are a number of other use cases other folks might have.
Here's what I am thinking:
In the
field.constraints
allow the user to pass in custom names and any arguments for that function.We can add new validation rules to the
table
. Perhaps something liketable.customValidators()
or similar.customValidators
accepts a map of synchronous and async functions and should be defined beforetable.read
ortable.iter
.This will allow the tableschema library more flexibility when it comes to validating data.
Thoughts?
The text was updated successfully, but these errors were encountered: