You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful if the validation errors (SchemaError and ValidationError) would be exported so that the errors could be referenced, e.g. with pytest.raises((dy.SchemaError, dy.ValidationError)):.
I'm not sure what you mean by persisting the errors. Maybe my description was lacking...
Right now the errors are not exposed in the public top-level API. Although they are not marked as private, it feels a bit hacky to import them from the exception module.
Activity
borchero commentedon Sep 10, 2026
If you want to persist the errors, isn't it an option to use
Schema.filterinstead ofSchema.validate?datenzauberai commentedon Sep 11, 2026
I'm not sure what you mean by persisting the errors. Maybe my description was lacking...
Right now the errors are not exposed in the public top-level API. Although they are not marked as private, it feels a bit hacky to import them from the exception module.
Today:
Technically you can reference the exception module
excat runtime, but linters will complain thatexcis an unknown attribute:That could be fixed by exposing the exception module, but I think it would be even better to have the exceptions exposed at the top-level (e.g. Patito does that https://patito.readthedocs.io/en/latest/api/patito/DataFrame/validate.html):
[-]Export validation errors[/-][+]Expose validation errors[/+]borchero commentedon Sep 14, 2026
Got it, sorry! 😅
In the tests, we commonly do
but you could also just do something like
for now. I think it would be fair to expose these errors on the top-level though.