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

empty columns of database table are not skipped #159

Closed JBPressac closed 8 months ago

JBPressac commented 2 years ago

Hello,

As mentioned for CSV files in https://github.com/RMLio/rmlmapper-java/issues/140#issue-1073680736, RmlMapper (v5.0.0.) does not skips triples with empty values from VARCHAR type columns of database tables, resulting in triples like subject predicate "" .

Thanks,

DylanVanAssche commented 2 years ago

Hi @JBPressac !

Thanks for your issue! We will have a look, did it work differently in previous versions?

LvanWissen commented 1 year ago

I can confirm that the latest release (v.6.1.3) does not skip empty column values. As mentioned in #140, v4.11 behaves as wanted/expected.

Example: I have a CSV with a column with IRIs, but these are not always filled. I want them to be IRIs in my output, if they are available.

My mapping:

[
  rr:predicate <http://xmlns.com/foaf/0.1/depiction>;
  rr:objectMap [ rml:reference "Image URL"; rr:termType rr:IRI ]
]

Output in v.6.1.3:

[main] ERROR be.ugent.rml.cli.Main               .run(416) - Not a valid (absolute) IRI: null

If removing the rr:termType rr:IRI, I get an empty literal. And all the values in this column are treated here as literal.

<myurihere> <http://xmlns.com/foaf/0.1/depiction> "" .

Output in v.4.11: No triple is created (as expected). The other (filled in) values are treated as IRIs.