RMLio / RML-Processor

16 stars 13 forks source link

Unable to generate nquads using rr:graphMap property #5

Open gone-phishing opened 8 years ago

gone-phishing commented 8 years ago

Even after specifying the flag "-f nquads" and adding rr:graphMap property to both the subject and predicateObject maps, I'm not able to reproduce N-Quads using RML-Processor.

The only example relevant to this is example7 for Airports.csv file. I was unable to reproduce the same output file as shown in this repository. Also to my surprise, the piece of code for testing example7 (asserts that actual output is same as desired output) is commented out.

Is this a known issue? Are there any workarounds? Why is rr:graphMap property being ignored by the processor?

gone-phishing commented 8 years ago

My custom use case is for converting a Json file to N-Quads. And here's my mapping file:

@prefix rr:     <http://www.w3.org/ns/r2rml#>.
@prefix rml:    <http://semweb.mmlab.be/ns/rml#> .
@prefix ql:     <http://semweb.mmlab.be/ns/ql#> .
@prefix schema: <http://schema.org/>.
@prefix grid: <http://grid.com/#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix ex: <http://www.example.com/#> .

<#InstituteMapping>
    rml:logicalSource [
        rml:source "examples/grid20.json";
        rml:referenceFormulation ql:JSONPath;
        rml:iterator "$.institutes.[*]" 
    ];

    rr:subjectMap [
        rr:template "http://sdw.org/{id}";
        rr:class schema:Education;
        rr:graphMap [ rr:constant ex:Graph ];
    ];

    rr:predicateObjectMap [
        rr:predicate grid:website;
        rr:objectMap [
            rml:reference "links"
        ];
        rr:graphMap [ rr:constant ex:Graph ];
    ].
gone-phishing commented 8 years ago

Any update on this?

andimou commented 8 years ago

This https://github.com/RMLio/RML-Processor/commit/d45f873c741d53214f91964ab7885aa3d7e6b002 should have fixed it. Let me know if not!