Skip to content

Validate output mappings with RML SHACL shapes #103

@niegrzybkowski

Description

@niegrzybkowski

Hi, based on the discussion in #69 I tried creating a constant valued blank node, but such a setup emitted invalid RML.

Steps to reproduce:

Run YATTER with the following yarrrml:

prefixes:
 ex: "http://example.com/"

mappings:
  person:
    sources:
      - ['data.json~jsonpath', '$.persons[*]']
    s:
        value: constant
        type: blank
    po:
      - [a, foaf:Person]
      - [ex:name, $(firstname) $(lastname)]

Which outputs the following RML subject map:

rr:subjectMap [
        a rr:SubjectMap;
        rr:constant "constant";
        rr:termType rr:BlankNode
];

Which is invalid according to the RML spec 6.1:

If the constant-valued term map is a subject map, predicate map or graph map, then its constant value must be an [IRI].

And is (understandably) rejected by some RML engines.

Expected behavior

YATTER works around this or fails when mapping, instead of emitting invalid RML.

Additional context

Templated blank nodes work correctly

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions