RMLio / rmlmapper-java

The RMLMapper executes RML rules to generate high quality Linked Data from multiple originally (semi-)structured data sources
http://rml.io
MIT License
146 stars 61 forks source link

Calling grel:string replace() on a CSV logical source when the subjectMap column is empty causes the entire conversion to fail #185

Closed nraphael closed 11 months ago

nraphael commented 2 years ago

e.g. id,name,age 1.0,Nick,21 2.0,Sam,22 ,Jeff,23 4.0,Alex,24

(Made up table) The error message is unhelpful: 17:53:20.626 [main] ERROR be.ugent.rml.cli.Main .main(404) - null The only diagnosis into the problem is to turn verbosity on and search for the record preceding the one that causes the failure. The processing should skip the defective record and signal the problem to the user.

rr:triplesMap1 a rr:TriplesMap ; rml:logicalSource [ rml:referenceFormulation ql:CSV ; rml:source "members.csv" ] ; rr:subjectMap [ fnml:functionValue [ rr:predicateObjectMap [ rr:predicate fno:executes ; rr:objectMap[ rr:constant grel:string_replace ] ]; rr:predicateObjectMap [ rr:predicate grel:valueParameter; rr:objectMap [ rr:template "https://members/{id}" ] ]; rr:predicateObjectMap [ rr:predicate grel:p_string_find ; rr:objectMap [ rr:constant ".0$"] ]; rr:predicateObjectMap [ rr:predicate grel:p_string_replace ; rr:objectMap [ rr:constant ''] ] ]; rr:termType rr:IRI; rr:class hbsko:Case ]; ....

GordianDziwis commented 1 year ago

The same with string_contains

DylanVanAssche commented 1 year ago

Which version of the RMLMapper are you using? We recently started to rework the functions to better handle this.

DylanVanAssche commented 11 months ago

No response for a long time, closing. Re-open if needed