IDLabResearch / RMLProcessor

http://rml.io/
11 stars 10 forks source link

No mapping occurs without predicateObjectMaps #13

Open DieterDePaepe opened 9 years ago

DieterDePaepe commented 9 years ago

I would expect mapping to occur for the following 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  rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix  ex:    <http://example.com/>.
@prefix  xsd:   <http://www.w3.org/2001/XMLSchema#>.

<#MoonWalkersMapping>
  rml:logicalSource [
    rml:source "./moon-walkers.csv";
    rml:referenceFormulation ql:CSV;
  ];
  rr:subjectMap [
    rr:template 'http://ex.com/{Name}';
    rr:class ex:Person ].
ktk commented 9 years ago

Can you try without the ./in the filename for a test? Do you have some sample data?

DieterDePaepe commented 9 years ago

Removing the ./ makes no difference.

Minimum adjustment to mapping file to make it work:

@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  rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix  ex:    <http://example.com/>.
@prefix  xsd:   <http://www.w3.org/2001/XMLSchema#>.

<#MoonWalkersMapping>
  rml:logicalSource [
    rml:source "moon-walkers.csv";
    rml:referenceFormulation ql:CSV;
  ];
  rr:subjectMap [
    rr:template 'http://ex.com/{Name}';
    rr:class ex:Person ];

  rr:predicateObjectMap [
    rr:predicate ex:birthday].

Example data:

Name,Birth Date,Death Date,Mission,EVA Date,Service
Neil Armstrong,1930-08-05,2012-08-25,Apollo 11,1969-07-21,NASA
Buzz Aldrin,1930-01-20,,Apollo 11,1969-07-21,Air Force
Pete Conrad,1930-06-02,1999-07-08,Apollo 12,1969-11-19,Navy
Alan Bean,1932-03-15,,Apollo 12,1969-11-19,Navy
Alan Shepard,1923-11-18,1998-07-21,Apollo 14,1971-02-05,Navy
Edgar Mitchell,1930-09-17,,Apollo 14,1971-02-05,Navy
David Scott,1932-06-06,,Apollo 15,1971-07-31,Air Force
James Irwin,1930-03-17,1991-08-08,Apollo 15,1971-07-31,Air Force
John Young,1930-09-24,,Apollo 16,1972-04-21,Navy
Charles Duke,1935-10-03,,Apollo 16,1972-04-21,Air Force
Eugene Cernan,1934-03-14,,Apollo 17,1972-12-11,Navy
Harrison Schmitt,1935-07-03,,Apollo 17,1972-12-11,NASA
Henry Larcom Abbot,1831-08-13,1927-10-01,,