[UPDATE 2021-06-07: Issue remains in Stardog v. 7.4.0 for removing constraints that involve bnodes. any update on possible fix?]
Hi folks,
I may be doing something wrong here, but it appears to me that the icv remove
command is not fully removing constraints from the database. Am I missing an option in the remove command? Here are my steps and results. I'm running this from the command line to take Studio out of the equation (related post from yesterday).
-
Create new database SHACLTest.
-
Load data.
-
Add constraint file:
stardog-admin icv add SHACLTest SHACL_SD1002-DEV.TTL
(Success) -
Run report:
stardog icv report SHACLTest
One error is correctly returned;
[
a sh:ValidationReport ;
sh:result [
a sh:ValidationResult ;
sh:resultMessage "Data error: Date value not in date or dateTime format." ;
sh:resultPath https://w3id.org/phuse/study#rfendtc ;
sh:focusNode https://w3id.org/phuse/cd16050#Subject_TEST-1 ;
sh:sourceShape :rfendtcDateFormatShape ;
sh:sourceConstraintComponent sh:OrConstraintComponent ;
sh:resultSeverity sh:Violation ;
sh:value "2019-01-30"
] ;
sh:conforms false
] .
-
Remove constraint.
stardog-admin icv remove SHACLTest SHACL_SD1002-DEV.TTL
(Success) -
Run the report:
stardog icv report SHACLTest
Success: Conforms true because no constraints in place.
[
a sh:ValidationReport ;
sh:conforms true
] .
-
Add same constraint file again.
stardog-admin icv add SHACLTest SHACL_SD1002-DEV.TTL
(Success) -
Run report:
stardog icv report SHACLTest
Now the same error is reported twice:
[
a sh:ValidationReport ;
sh:result [
a sh:ValidationResult ;
sh:sourceConstraintComponent sh:OrConstraintComponent ;
sh:focusNode https://w3id.org/phuse/cd16050#Subject_TEST-1 ;
sh:value "2019-01-30" ;
sh:resultSeverity sh:Violation ;
sh:sourceShape :rfendtcDateFormatShape ;
sh:resultPath https://w3id.org/phuse/study#rfendtc ;
sh:resultMessage "Data error: Date value not in date or dateTime format."
] , [
a sh:ValidationResult ;
sh:focusNode https://w3id.org/phuse/cd16050#Subject_TEST-1 ;
sh:resultSeverity sh:Violation ;
sh:value "2019-01-30" ;
sh:sourceShape :rfendtcDateFormatShape ;
sh:resultPath https://w3id.org/phuse/study#rfendtc ;
sh:resultMessage "Data error: Date value not in date or dateTime format." ;
sh:sourceConstraintComponent sh:OrConstraintComponent
] ;
sh:conforms false
] .
If I remove and add the same constraint file again and run the report, the same error is now reported 3 times, etc.
Stardog version 6.1
Cheers,
Tim