You can get the report, if there is a violation, from the exception: http://docs.rdf4j.org/programming/#_validation_results
Håvard
Ok, will do
😊
My use case is quite different, validating small to medium-sized exports.
Hence the interest of having a report, especially if it could be added to the console or a small cli tool
(e.g. something like verify data.ttl shac.ttl report.ttl)
Best regards
Bart Hanssens
This is great :) I haven’t had any feedback from any users using the shacl engine yet!
I would recommend you try the 3.0-SNAPSHOT. It’s considerably faster than the 2.5 release. Keep in mind that the shacl engine is designed to validate small changes to large datasets, like for instance a live transactional database.
If you run out of memory, you can disable caching. That should reduce the memory pressure quite a bit.
Also you can try to enable parallel validation, which will execute all shacl rules in parallel.
If you’re wondering about what features the engine supports, or how to model a specific validation, just send an email :)
Hello Håvard
well, I'm hoping to be able to spend some more time on testing SHACL next week.
(un)fortunately I've about half a million triples that need to be validated,
so that might produce some interesting test scenarios...
Best regards
Bart
Attaching a “validation report handler” could be a decent pattern :)
The ShaclSail is supposed to report all violations and not stop on the first one. But I remember seeing an edge case a while back where it didn’t do that correctly. Don’t really have any test for that. Want
to add some?
Hi,
would also be useful to offer the possibility to only report sh:Violation and not fail on first error
(use case: sending validation reports of several DCAT-AP feeds to their respective sources)
Not sure about log (unless there is a specific log handler that could write a report to a file,
using marker to differentiate between the SHACL violations and internal SHACL engine errors,
but this seems )
Maybe a method that takes an RDFHandler as argument,
so that the triples of the validation report can be written during the validation ?
Best regards
Bart
Hi,
In SHACL you can have a number of severity levels for a shape (rule). Currently we do not support these.
Does anyone have any recommendation for how to support this?
A shape with severity sh:Warning is violated. This should not cause the commit() to fail, but there should still be some way for the developer to get hold of the validation report. Currently that report is tucked away in the exception that
is thrown by commit(), but in this case no exception should be thrown.
I have been thinking about a few options, all rather bad:
- log sh:Warning and sh:Info level violations, and do nothing else
- add a method to the SHACL connection to retrieve the current validation report
- add a return type to the commit() or prepare() method
Anyone have a better suggestion, or maybe feel that one of the above is good enough?
|