RML Test Cases

Unofficial Draft

Latest editor's draft:
https://rmlio.github.io/rml-test-cases/
Editors:
(Ghent University - IDLab, imec)
Anastasia Dimou (Ghent University - IDLab, imec)
Ben De Meester (Ghent University - IDLab, imec)
Participate:
GitHub rmlio/rml-test-cases
File a bug
Commit history
Pull requests

Abstract

This document defines the RML test cases to the determine the RML specification conformance of tools.

Status of This Document

This document is draft of a potential specification. It has no official standing of any kind and does not represent the support or consensus of any standards organization.

1. Introduction

This document defines the RML test cases, consisting of a collection of test case documents (input and expected output). The purpose of the test cases is to determine the conformance of tools that execute RML rules to the RML specification.

2. Test cases

This section describes the RML test cases. These descriptions are also available as RDF. The files are available on Github in the folder test-cases. Each test case is contained in a single folder, containing three types of files:

2.1 RMLTC0000-CSV

Title: one table, one column, zero rows

Description: Tests if an empty table produces an empty RDF graph

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
        
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ] ;
	
  rr:subjectMap [ 
    rr:template "http://example.com/{Name}" 
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rml:reference "Name" 
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

# empty database

2.2 RMLTC0000-JSON

Title: one table, one column, zero rows

Description: Tests if an empty table produces an empty RDF graph

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
        
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ] ;
	
  rr:subjectMap [ 
    rr:template "http://example.com/{Name}" 
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rml:reference "Name" 
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

# empty database

2.3 RMLTC0000-MySQL

Title: one table, one column, zero rows

Description: Tests if an empty table produces an empty RDF graph

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [
      rr:template "http://example.com/{Name}"
    ];

    rr:predicateObjectMap [
      rr:predicate foaf:name ;
      rr:objectMap [
        rml:reference "Name"
      ]
    ].


<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

# empty database

2.4 RMLTC0000-PostgreSQL

Title: one table, one column, zero rows

Description: Tests if an empty table produces an empty RDF graph

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [
      rr:template "http://example.com/{Name}"
    ];

    rr:predicateObjectMap [
      rr:predicate foaf:name ;
      rr:objectMap [
        rml:reference "Name"
      ]
    ].


<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

# empty database

2.5 RMLTC0000-SQLServer

Title: one table, one column, zero rows

Description: Tests if an empty table produces an empty RDF graph

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [
      rr:template "http://example.com/{Name}"
    ];

    rr:predicateObjectMap [
      rr:predicate foaf:name ;
      rr:objectMap [
        rml:reference "Name"
      ]
    ].


<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

# empty database

2.6 RMLTC0000-XML

Title: one table, one column, zero rows

Description: Tests if an empty table produces an empty RDF graph

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
        
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ] ;
	
  rr:subjectMap [ 
    rr:template "http://example.com/{Name}" 
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rml:reference "Name" 
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

# empty database

2.7 RMLTC0001a-CSV

Title: One column mapping, subject URI generation by using rr:template

Description: Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV 
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Name}" 
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

										

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .

2.8 RMLTC0001a-JSON

Title: One column mapping, subject URI generation by using rr:template

Description: Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap <#NameSubjectMap> ;

  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

<#NameSubjectMap> rr:template "http://example.com/{Name}" .


										

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .

2.9 RMLTC0001a-MySQL

Title: One column mapping, subject URI generation by using rr:template

Description: Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/{Name}" 
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

										
<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .

2.10 RMLTC0001a-PostgreSQL

Title: One column mapping, subject URI generation by using rr:template

Description: Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/{Name}" 
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

										
<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .

2.11 RMLTC0001a-SQLServer

Title: One column mapping, subject URI generation by using rr:template

Description: Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/{Name}" 
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].
										
<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .

2.12 RMLTC0001a-XML

Title: One column mapping, subject URI generation by using rr:template

Description: Tests: (1) one column mapping; (2) subject URI generation by using rr:tmplate; (3) one column to one property

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Name}" 
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

										

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .

2.13 RMLTC0001b-CSV

Title: One column mapping, generation of a BlankNode subject by using rr:termType

Description: Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property

RML rules (download):

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

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [
    rr:template "{Name}";
    rr:termType rr:BlankNode
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .

2.14 RMLTC0001b-JSON

Title: One column mapping, generation of a BlankNode subject by using rr:termType

Description: Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property

RML rules (download):

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

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [
    rr:template "{Name}";
    rr:termType rr:BlankNode
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .

2.15 RMLTC0001b-MySQL

Title: One column mapping, generation of a BlankNode subject by using rr:termType

Description: Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT Name FROM student";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Name}" 
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

										
<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .

2.16 RMLTC0001b-PostgreSQL

Title: One column mapping, generation of a BlankNode subject by using rr:termType

Description: Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT name FROM student";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{name}"
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "name"
    ]
  ].

										
<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .

2.17 RMLTC0001b-SQLServer

Title: One column mapping, generation of a BlankNode subject by using rr:termType

Description: Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT Name FROM student";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [
    rr:template "http://example.com/{Name}"
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

										
<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .

2.18 RMLTC0001b-XML

Title: One column mapping, generation of a BlankNode subject by using rr:termType

Description: Tests: (1) one column mapping; (2) generation of a BlankNode subject by using rr:termType; (3) one column to one property

RML rules (download):

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

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [
    rr:template "{Name}";
    rr:termType rr:BlankNode
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

_:Venus <http://xmlns.com/foaf/0.1/name> "Venus" .

2.19 RMLTC0002a-CSV

Title: Two columns mapping, generation of a subject URI by the concatenation of two column values

Description: Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{ID}/{Name}";
    rr:class foaf:Person 
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ; 
    rr:objectMap [ rml:reference "ID" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ rml:reference "Name" ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/10/Venus> <http://example.com/id> "10" .
<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.20 RMLTC0002a-JSON

Title: Two columns mapping, generation of a subject URI by the concatenation of two column values

Description: Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{ID}/{Name}";
    rr:class foaf:Person 
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ; 
    rr:objectMap [ rml:reference "ID" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ rml:reference "Name" ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/10/Venus> <http://example.com/id> "10" .
<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.21 RMLTC0002a-MySQL

Title: Two columns mapping, generation of a subject URI by the concatenation of two column values

Description: Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .


<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{ID}/{Name}";
    rr:class foaf:Person 
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ; 
    rr:objectMap [ rml:reference "ID" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ rml:reference "Name" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.22 RMLTC0002a-PostgreSQL

Title: Two columns mapping, generation of a subject URI by the concatenation of two column values

Description: Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .


<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{ID}/{Name}";
    rr:class foaf:Person 
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ; 
    rr:objectMap [ rml:reference "ID" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ rml:reference "Name" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.23 RMLTC0002a-SQLServer

Title: Two columns mapping, generation of a subject URI by the concatenation of two column values

Description: Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .


<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{ID}/{Name}";
    rr:class foaf:Person 
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ; 
    rr:objectMap [ rml:reference "ID" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ rml:reference "Name" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.24 RMLTC0002a-XML

Title: Two columns mapping, generation of a subject URI by the concatenation of two column values

Description: Tests: (1) two column mapping, no primary key; (2) subject URI generated by the concatenation of two column values; (3) one column to one property

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{ID}/{Name}";
    rr:class foaf:Person 
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ; 
    rr:objectMap [ rml:reference "ID" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ rml:reference "Name" ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/10/Venus> <http://example.com/id> "10".
<http://example.com/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.25 RMLTC0002b-CSV

Title: Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType

Description: Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "students{ID}";
    rr:termType rr:BlankNode
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [ rml:reference "Name" ]
  ].

Error expected: No

Expected knowledge graph: (download)

_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .

2.26 RMLTC0002b-JSON

Title: Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType

Description: Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "students{ID}";
    rr:termType rr:BlankNode
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [ rml:reference "Name" ]
  ].

Error expected: No

Expected knowledge graph: (download)

_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .

2.27 RMLTC0002b-MySQL

Title: Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType

Description: Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];

  rr:subjectMap [
    rr:template "students{ID}";
    rr:termType rr:BlankNode
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "Name" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .

2.28 RMLTC0002b-PostgreSQL

Title: Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType

Description: Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];

  rr:subjectMap [
    rr:template "students{ID}";
    rr:termType rr:BlankNode
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "Name" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .

2.29 RMLTC0002b-SQLServer

Title: Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType

Description: Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];

  rr:subjectMap [
    rr:template "students{ID}";
    rr:termType rr:BlankNode
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "Name" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .

2.30 RMLTC0002b-XML

Title: Two columns mapping, generation of a BlankNode subject by using rr:template and rr:termType

Description: Tests: (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using rr:template; (3) one column to one property

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "students{ID}";
    rr:termType rr:BlankNode
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [ rml:reference "Name" ]
  ].

Error expected: No

Expected knowledge graph: (download)

_:students10 <http://xmlns.com/foaf/0.1/name> "Venus" .

2.31 RMLTC0002c-CSV

Title: Two columns mapping, an undefined SQL identifier / logical reference

Description: Tests the presence of an undefined SQL identifier / logical reference

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{ID}/{Name}"; 
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ; 
    rr:objectMap [ rml:reference "IDs" ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.32 RMLTC0002c-JSON

Title: Two columns mapping, an undefined SQL identifier / logical reference

Description: Tests the presence of an undefined SQL identifier / logical reference

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{ID}/{Name}"; 
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ; 
    rr:objectMap [ rml:reference "IDs" ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.33 RMLTC0002c-MySQL

Title: Two columns mapping, an undefined SQL identifier / logical reference

Description: Tests the presence of an undefined SQL identifier / logical reference

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.34 RMLTC0002c-PostgreSQL

Title: Two columns mapping, an undefined SQL identifier / logical reference

Description: Tests the presence of an undefined SQL identifier / logical reference

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.35 RMLTC0002c-SQLServer

Title: Two columns mapping, an undefined SQL identifier / logical reference

Description: Tests the presence of an undefined SQL identifier / logical reference

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.36 RMLTC0002c-XML

Title: Two columns mapping, an undefined SQL identifier / logical reference

Description: Tests the presence of an undefined SQL identifier / logical reference

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{ID}/{Name}"; 
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ; 
    rr:objectMap [ rml:reference "IDs" ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.37 RMLTC0002d-MySQL

Title: Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns

Description: Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT ('Student' || \"ID\" ) AS StudentId, \"ID\", \"Name\" FROM student";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [
      rml:reference "StudentId". rr:termType rr:BlankNode
    ];

    rr:predicateObjectMap [
      rr:predicate foaf:name ;
      rr:objectMap [ rml:reference "\"Name\"" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

_:Student10 <http://xmlns.com/foaf/0.1/name> "Venus".

2.38 RMLTC0002d-PostgreSQL

Title: Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns

Description: Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT ('Student' || \"ID\" ) AS StudentId, \"ID\", \"Name\" FROM student";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [
      rml:reference "StudentId". rr:termType rr:BlankNode
    ];

    rr:predicateObjectMap [
      rr:predicate foaf:name ;
      rr:objectMap [ rml:reference "\"Name\"" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "org.postgresql.Driver"; # this is ignored
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

_:Student10 <http://xmlns.com/foaf/0.1/name> "Venus".

2.39 RMLTC0002d-SQLServer

Title: Two columns mapping, generation of a BlankNode subject by using a SQL Query that concatenates two columns

Description: Tests (1) two column mapping, no primary key; (2) generation of a BlankNode subject by using a SQL Query that concatenates two columns; (3) one column to one property

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT ('Student' || \"ID\" ) AS StudentId, \"ID\", \"Name\" FROM student";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [
      rml:reference "StudentId". rr:termType rr:BlankNode
    ];

    rr:predicateObjectMap [
      rr:predicate foaf:name ;
      rr:objectMap [ rml:reference "\"Name\"" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver"; # this is ignored
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

_:Student10 <http://xmlns.com/foaf/0.1/name> "Venus".

2.40 RMLTC0002e-CSV

Title: Two columns mapping, an undefined rr:tableName

Description: Tests the presence of an undefined rr:tableName

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student2.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{ID}/{Name}"; 
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ; 
    rr:objectMap [ rml:reference "IDs" ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.41 RMLTC0002e-JSON

Title: Two columns mapping, an undefined rr:tableName

Description: Tests the presence of an undefined rr:tableName

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student2.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{ID}/{Name}"; 
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ; 
    rr:objectMap [ rml:reference "IDs" ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.42 RMLTC0002e-MySQL

Title: Two columns mapping, an undefined rr:tableName

Description: Tests the presence of an undefined rr:tableName

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"Students\""
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.43 RMLTC0002e-PostgreSQL

Title: Two columns mapping, an undefined rr:tableName

Description: Tests the presence of an undefined rr:tableName

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"Students\""
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.44 RMLTC0002e-SQLServer

Title: Two columns mapping, an undefined rr:tableName

Description: Tests the presence of an undefined rr:tableName

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"Students\""
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.45 RMLTC0002e-XML

Title: Two columns mapping, an undefined rr:tableName

Description: Tests the presence of an undefined rr:tableName

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student2.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{ID}/{Name}"; 
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ; 
    rr:objectMap [ rml:reference "IDs" ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.46 RMLTC0002f-MySQL

Title: Two columns mapping, delimited identifiers referenced as regular identifiers

Description: Tests the presence of delimited identifiers referenced as regular identifiers. Within rr:template ID is ok, but Name is not

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"Student\""
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
       r:class foaf:Person
    ];

    rr:predicateObjectMap
    [
      rr:predicate		ex:id ;
      rr:objectMap		[ rml:reference "\"ID\"";  ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		foaf:name ;
      rr:objectMap		[ rml:reference "\"Name\"" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.47 RMLTC0002f-PostgreSQL

Title: Two columns mapping, delimited identifiers referenced as regular identifiers

Description: Tests the presence of delimited identifiers referenced as regular identifiers. Within rr:template ID is ok, but Name is not

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"Student\""
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
       r:class foaf:Person
    ];

    rr:predicateObjectMap
    [
      rr:predicate		ex:id ;
      rr:objectMap		[ rml:reference "\"ID\"";  ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		foaf:name ;
      rr:objectMap		[ rml:reference "\"Name\"" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.48 RMLTC0002f-SQLServer

Title: Two columns mapping, delimited identifiers referenced as regular identifiers

Description: Tests the presence of delimited identifiers referenced as regular identifiers. Within rr:template ID is ok, but Name is not

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"Student\""
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
       r:class foaf:Person
    ];

    rr:predicateObjectMap
    [
      rr:predicate		ex:id ;
      rr:objectMap		[ rml:reference "\"ID\"";  ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		foaf:name ;
      rr:objectMap		[ rml:reference "\"Name\"" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.49 RMLTC0002g-MySQL

Title: Two columns mapping, invalid SQL query

Description: Tests the presence of an invalid SQL query

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT kjnqsdjfbqsdjfmsdnfm FROM student";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.50 RMLTC0002g-PostgreSQL

Title: Two columns mapping, invalid SQL query

Description: Tests the presence of an invalid SQL query

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT kjnqsdjfbqsdjfmsdnfm FROM student";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.51 RMLTC0002g-SQLServer

Title: Two columns mapping, invalid SQL query

Description: Tests the presence of an invalid SQL query

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT kjnqsdjfbqsdjfmsdnfm FROM student";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.52 RMLTC0002h-MySQL

Title: Two columns mapping, duplicate column name in SELECT

Description: Tests the presence of duplicate column names in the SELECT list of the SQL query

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT Name, Name FROM student";
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.53 RMLTC0002h-PostgreSQL

Title: Two columns mapping, duplicate column name in SELECT

Description: Tests the presence of duplicate column names in the SELECT list of the SQL query

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT Name, Name FROM student";
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.54 RMLTC0002h-SQLServer

Title: Two columns mapping, duplicate column name in SELECT

Description: Tests the presence of duplicate column names in the SELECT list of the SQL query

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT Name, Name FROM student";
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.55 RMLTC0002i-MySQL

Title: Two columns mapping, SQL Version identifier

Description: Tests the presence of a SQL Version identifier

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rml:query "SELECT Name FROM student";
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .
  

Error expected: No

Expected knowledge graph: (download)


            
        

2.56 RMLTC0002i-PostgreSQL

Title: Two columns mapping, SQL Version identifier

Description: Tests the presence of a SQL Version identifier

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rml:query "SELECT Name FROM student";
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)


            
        

2.57 RMLTC0002i-SQLServer

Title: Two columns mapping, SQL Version identifier

Description: Tests the presence of a SQL Version identifier

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rml:query "SELECT Name FROM student";
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)


            
        

2.58 RMLTC0002j-MySQL

Title: Two columns mapping, qualified column names

Description: Tests the presence of qualified column names in the SELECT list of the SQL query

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT NoColumnName, Name FROM student";
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)


            
        

2.59 RMLTC0002j-PostgreSQL

Title: Two columns mapping, qualified column names

Description: Tests the presence of qualified column names in the SELECT list of the SQL query

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT NoColumnName, Name FROM student";
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)


            
        

2.60 RMLTC0002j-SQLServer

Title: Two columns mapping, qualified column names

Description: Tests the presence of qualified column names in the SELECT list of the SQL query

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT NoColumnName, Name FROM student";
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)


            
        

2.61 RMLTC0003a-MySQL

Title: Three columns mapping, undefined SQL Version identifier

Description: Tests the presence of an undefined SQL Version identifier

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rml:query "SELECT FirstName, LastName FROM student";
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.62 RMLTC0003a-PostgreSQL

Title: Three columns mapping, undefined SQL Version identifier

Description: Tests the presence of an undefined SQL Version identifier

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rml:query "SELECT FirstName, LastName FROM student";
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.63 RMLTC0003a-SQLServer

Title: Three columns mapping, undefined SQL Version identifier

Description: Tests the presence of an undefined SQL Version identifier

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rml:query "SELECT FirstName, LastName FROM student";
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{Name}";
    ];

    rr:predicateObjectMap [
      rr:predicate ex:id ;
      rr:objectMap [ rml:reference "IDs" ]
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.64 RMLTC0003b-MySQL

Title: Three columns mapping, concatenation of columns, by using a rr:sqlQuery to produce literal

Description: Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rr:sqlQuery

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT ID, LastName, CONCAT(`FirstName`, '', `LastName`) as Name FROM student";
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{LastName}";
    ];

    rr:predicateObjectMap [
        rr:predicate foaf:name ;
        rr:objectMap [
          rml:reference "Name";
          rr:termType rr:Literal;
        ]
      ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/10/Williams> <http://xmlns.com/foaf/0.1/name> "VenusWilliams" .

2.65 RMLTC0003b-PostgreSQL

Title: Three columns mapping, concatenation of columns, by using a rr:sqlQuery to produce literal

Description: Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rr:sqlQuery

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT id, lastname, concat_ws(firstname, '', lastname) as name FROM student";
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{id}/{lastname}";
    ];

    rr:predicateObjectMap [
        rr:predicate foaf:name ;
        rr:objectMap [
          rml:reference "name";
          rr:termType rr:Literal;
        ]
      ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/10/Williams> <http://xmlns.com/foaf/0.1/name> "VenusWilliams" .

2.66 RMLTC0003b-SQLServer

Title: Three columns mapping, concatenation of columns, by using a rr:sqlQuery to produce literal

Description: Tests: (1) three column mapping; and (2) concatenation of columns to produce literal, by using a rr:sqlQuery

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query "SELECT ID, LastName, concat_ws(FirstName, '', LastName) as Name FROM student";
    rr:tableName "student";
  ];

  rr:subjectMap [
      rr:template "http://example.com/{ID}/{LastName}";
    ];

    rr:predicateObjectMap [
        rr:predicate foaf:name ;
        rr:objectMap [
          rml:reference "Name";
          rr:termType rr:Literal;
        ]
      ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/10/Williams> <http://xmlns.com/foaf/0.1/name> "VenusWilliams" .

2.67 RMLTC0003c-CSV

Title: Three columns mapping, by using a rr:template to produce literal

Description: Tests: (1) three column mapping; and (2) the use of rr:template to produce literal

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student{ID}";
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rr:template "{FirstName} {LastName}"; 
      rr:termType rr:Literal; 
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .

2.68 RMLTC0003c-JSON

Title: Three columns mapping, by using a rr:template to produce literal

Description: Tests: (1) three column mapping; and (2) the use of rr:template to produce literal

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student{ID}";
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rr:template "{FirstName} {LastName}"; 
      rr:termType rr:Literal; 
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .

2.69 RMLTC0003c-MySQL

Title: Three columns mapping, by using a rr:template to produce literal

Description: Tests: (1) three column mapping; and (2) the use of rr:template to produce literal

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student{ID}";
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rr:template "{FirstName} {LastName}"; 
      rr:termType rr:Literal; 
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .

2.70 RMLTC0003c-PostgreSQL

Title: Three columns mapping, by using a rr:template to produce literal

Description: Tests: (1) three column mapping; and (2) the use of rr:template to produce literal

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student{ID}";
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rr:template "{FirstName} {LastName}"; 
      rr:termType rr:Literal; 
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .

2.71 RMLTC0003c-SQLServer

Title: Three columns mapping, by using a rr:template to produce literal

Description: Tests: (1) three column mapping; and (2) the use of rr:template to produce literal

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student{ID}";
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rr:template "{FirstName} {LastName}"; 
      rr:termType rr:Literal; 
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .

2.72 RMLTC0003c-XML

Title: Three columns mapping, by using a rr:template to produce literal

Description: Tests: (1) three column mapping; and (2) the use of rr:template to produce literal

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student{ID}";
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [ 
      rr:template "{FirstName} {LastName}"; 
      rr:termType rr:Literal; 
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .

2.73 RMLTC0004a-CSV

Title: Two column mapping, from one row table to two different triples

Description: Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student_sport.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Student}";
    rr:class ex:Student
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rml:reference "Student"
    ]
  ].

<TriplesMap2> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student_sport.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Sport}";
    rr:class ex:Sport
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rml:reference "Sport"
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .

2.74 RMLTC0004a-JSON

Title: Two column mapping, from one row table to two different triples

Description: Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student_sport.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Student}";
    rr:class ex:Student
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rml:reference "Student"
    ]
  ].

<TriplesMap2> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student_sport.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Sport}";
    rr:class ex:Sport
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rml:reference "Sport"
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .

2.75 RMLTC0004a-MySQL

Title: Two column mapping, from one row table to two different triples

Description: Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student_sport";
];

  rr:subjectMap [ 
    rr:template "http://example.com/{Student}";
    rr:class ex:Student
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rml:reference "Student"
    ]
  ].

<TriplesMap2> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student_sport";
];

  rr:subjectMap [ 
    rr:template "http://example.com/{Sport}";
    rr:class ex:Sport
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rml:reference "Sport"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .

2.76 RMLTC0004a-PostgreSQL

Title: Two column mapping, from one row table to two different triples

Description: Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student_sport";
];

  rr:subjectMap [ 
    rr:template "http://example.com/{Student}";
    rr:class ex:Student
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rml:reference "Student"
    ]
  ].

<TriplesMap2> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student_sport";
];

  rr:subjectMap [ 
    rr:template "http://example.com/{Sport}";
    rr:class ex:Sport
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rml:reference "Sport"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .

2.77 RMLTC0004a-SQLServer

Title: Two column mapping, from one row table to two different triples

Description: Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student_sport";
];

  rr:subjectMap [ 
    rr:template "http://example.com/{Student}";
    rr:class ex:Student
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rml:reference "Student"
    ]
  ].

<TriplesMap2> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student_sport";
];

  rr:subjectMap [ 
    rr:template "http://example.com/{Sport}";
    rr:class ex:Sport
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rml:reference "Sport"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .

2.78 RMLTC0004a-XML

Title: Two column mapping, from one row table to two different triples

Description: Tests: (1) two column mapping, (2) subject URI generated by a column value; (3) from one row table to two different triples (4) typing by using rr:class

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student_sport.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Student}";
    rr:class ex:Student
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rml:reference "Student"
    ]
  ].

<TriplesMap2> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student_sport.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Sport}";
    rr:class ex:Sport
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [ 
      rml:reference "Sport"
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .
<http://example.com/Tennis> <http://xmlns.com/foaf/0.1/name> "Tennis" .
<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Sport> .

2.79 RMLTC0004b-CSV

Title: One column mapping, presence of rr:termType rr:Literal on rr:subjectMap

Description: Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV 
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Name}";
    rr:termType rr:Literal
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.80 RMLTC0004b-JSON

Title: One column mapping, presence of rr:termType rr:Literal on rr:subjectMap

Description: Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Name}";
    rr:termType rr:Literal 
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

										

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.81 RMLTC0004b-MySQL

Title: One column mapping, presence of rr:termType rr:Literal on rr:subjectMap

Description: Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/{Name}";
    rr:termType rr:Literal
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.82 RMLTC0004b-PostgreSQL

Title: One column mapping, presence of rr:termType rr:Literal on rr:subjectMap

Description: Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/{Name}";
    rr:termType rr:Literal
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.83 RMLTC0004b-SQLServer

Title: One column mapping, presence of rr:termType rr:Literal on rr:subjectMap

Description: Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/{Name}";
    rr:termType rr:Literal
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.84 RMLTC0004b-XML

Title: One column mapping, presence of rr:termType rr:Literal on rr:subjectMap

Description: Tests: (1) one column mapping (2) the presence of rr:termType rr:Literal on rr:subjectMap, which is invalid

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Name}";
    rr:termType rr:Literal 
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name; 
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

										

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.85 RMLTC0005a-CSV

Title: Typing of resources

Description: Tests the typing of resources

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "ious.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{fname};{lname}";
    rr:class foaf:Person;
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:owes; 
    rr:objectMap [ rml:reference "amount"; ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .

2.86 RMLTC0005a-JSON

Title: Typing of resources

Description: Tests the typing of resources

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "ious.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.persons[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{fname};{lname}";
    rr:class foaf:Person;
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:owes; 
    rr:objectMap [ rml:reference "amount"; ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .

2.87 RMLTC0005a-MySQL

Title: Typing of resources

Description: Tests the typing of resources

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"IOUs\"";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{\"fname\"};{\"lname\"}";
    rr:class foaf:Person;
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:owes; 
    rr:objectMap [ rml:reference "\"amount\""; ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Bob;Smith> <http://example.com/owes> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Sue;Jones> <http://example.com/owes> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .

2.88 RMLTC0005a-PostgreSQL

Title: Typing of resources

Description: Tests the typing of resources

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"IOUs\"";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{\"fname\"};{\"lname\"}";
    rr:class foaf:Person;
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:owes; 
    rr:objectMap [ rml:reference "\"amount\""; ]
  ].


<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Bob;Smith> <http://example.com/owes> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Sue;Jones> <http://example.com/owes> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .

2.89 RMLTC0005a-SQLServer

Title: Typing of resources

Description: Tests the typing of resources

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"IOUs\"";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{\"fname\"};{\"lname\"}";
    rr:class foaf:Person;
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:owes; 
    rr:objectMap [ rml:reference "\"amount\""; ]
  ].


<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Bob;Smith> <http://example.com/owes> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Sue;Jones> <http://example.com/owes> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .

2.90 RMLTC0005a-XML

Title: Typing of resources

Description: Tests the typing of resources

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "ious.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/persons/person"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{fname};{lname}";
    rr:class foaf:Person;
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:owes; 
    rr:objectMap [ rml:reference "amount"; ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Bob;Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Bob;Smith> <http://example.com/owes> "30.0E0" .
<http://example.com/Sue;Jones> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Sue;Jones> <http://example.com/owes> "20.0E0" .

2.91 RMLTC0005b-MySQL

Title: Default mapping

Description: Tests the generation of a default mapping for tables without a primary key

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"IOUs\"";
  ];

  rr:subjectMap [ 
    rr:template "{\"fname\"}_{\"lname\"}";
    rr:class <IOUs>;
    rr:termType rr:BlankNode
  ];

  rr:predicateObjectMap [ 
    rr:predicate <IOUs#fname>; 
    rr:objectMap [ rml:reference "\"fname\""; ]
  ].

  rr:predicateObjectMap [ 
    rr:predicate <IOUs#lname>; 
    rr:objectMap [ rml:reference "\"lname\""; ]
  ].

  rr:predicateObjectMap [ 
    rr:predicate <IOUs#amount>; 
    rr:objectMap [ rml:reference "\"amount\""; ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

_:BobSmith <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:BobSmith <http://example.com/base/IOUs#fname> "Bob" .
_:BobSmith <http://example.com/base/IOUs#lname> "Smith" .
_:BobSmith <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:SueJones <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:SueJones <http://example.com/base/IOUs#fname> "Sue" .
_:SueJones <http://example.com/base/IOUs#lname> "Jones" .
_:SueJones <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
	

2.92 RMLTC0005b-PostgreSQL

Title: Default mapping

Description: Tests the generation of a default mapping for tables without a primary key

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"IOUs\"";
  ];

  rr:subjectMap [ 
    rr:template "{\"fname\"}_{\"lname\"}";
    rr:class <IOUs>;
    rr:termType rr:BlankNode
  ];

  rr:predicateObjectMap [ 
    rr:predicate <IOUs#fname>; 
    rr:objectMap [ rml:reference "\"fname\""; ]
  ].

  rr:predicateObjectMap [ 
    rr:predicate <IOUs#lname>; 
    rr:objectMap [ rml:reference "\"lname\""; ]
  ].

  rr:predicateObjectMap [ 
    rr:predicate <IOUs#amount>; 
    rr:objectMap [ rml:reference "\"amount\""; ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

_:BobSmith <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:BobSmith <http://example.com/base/IOUs#fname> "Bob" .
_:BobSmith <http://example.com/base/IOUs#lname> "Smith" .
_:BobSmith <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:SueJones <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:SueJones <http://example.com/base/IOUs#fname> "Sue" .
_:SueJones <http://example.com/base/IOUs#lname> "Jones" .
_:SueJones <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
	

2.93 RMLTC0005b-SQLServer

Title: Default mapping

Description: Tests the generation of a default mapping for tables without a primary key

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"IOUs\"";
  ];

  rr:subjectMap [ 
    rr:template "{\"fname\"}_{\"lname\"}";
    rr:class <IOUs>;
    rr:termType rr:BlankNode
  ];

  rr:predicateObjectMap [ 
    rr:predicate <IOUs#fname>; 
    rr:objectMap [ rml:reference "\"fname\""; ]
  ].

  rr:predicateObjectMap [ 
    rr:predicate <IOUs#lname>; 
    rr:objectMap [ rml:reference "\"lname\""; ]
  ].

  rr:predicateObjectMap [ 
    rr:predicate <IOUs#amount>; 
    rr:objectMap [ rml:reference "\"amount\""; ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

_:BobSmith <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:BobSmith <http://example.com/base/IOUs#fname> "Bob" .
_:BobSmith <http://example.com/base/IOUs#lname> "Smith" .
_:BobSmith <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:SueJones <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:SueJones <http://example.com/base/IOUs#fname> "Sue" .
_:SueJones <http://example.com/base/IOUs#lname> "Jones" .
_:SueJones <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
	

2.94 RMLTC0006a-CSV

Title: Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap

Description: Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:constant ex:BadStudent;  
    rr:graphMap [ rr:constant <http://example.com/graph/student> ];
  ];

  rr:predicateObjectMap [ 
    rr:predicateMap [ rr:constant ex:description ]; 
    rr:objectMap [ rr:constant "Bad Student"; ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .

2.95 RMLTC0006a-JSON

Title: Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap

Description: Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:constant ex:BadStudent;  
    rr:graphMap [ rr:constant <http://example.com/graph/student> ];
  ];

  rr:predicateObjectMap [ 
    rr:predicateMap [ rr:constant ex:description ]; 
    rr:objectMap [ rr:constant "Bad Student"; ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .

2.96 RMLTC0006a-MySQL

Title: Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap

Description: Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [
    rr:constant ex:BadStudent;
    rr:graphMap [ rr:constant <http://example.com/graph/student> ];
  ];

  rr:predicateObjectMap [
    rr:predicateMap [ rr:constant ex:description ];
    rr:objectMap [ rr:constant "Bad Student"; ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .

2.97 RMLTC0006a-PostgreSQL

Title: Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap

Description: Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [
    rr:constant ex:BadStudent;
    rr:graphMap [ rr:constant <http://example.com/graph/student> ];
  ];

  rr:predicateObjectMap [
    rr:predicateMap [ rr:constant ex:description ];
    rr:objectMap [ rr:constant "Bad Student"; ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .

2.98 RMLTC0006a-SQLServer

Title: Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap

Description: Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [
    rr:constant ex:BadStudent;
    rr:graphMap [ rr:constant <http://example.com/graph/student> ];
  ];

  rr:predicateObjectMap [
    rr:predicateMap [ rr:constant ex:description ];
    rr:objectMap [ rr:constant "Bad Student"; ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .

2.99 RMLTC0006a-XML

Title: Long form of R2RML by using rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap

Description: Tests the use of rr:constant in rr:subjectMap, rr:predicateMap, rr:objectMap and rr:graphMap

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;

  rml:logicalSource [
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [
    rr:constant ex:BadStudent;
    rr:graphMap [ rr:constant <http://example.com/graph/student> ];
  ];

  rr:predicateObjectMap [
    rr:predicateMap [ rr:constant ex:description ];
    rr:objectMap [ rr:constant "Bad Student"; ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/BadStudent> <http://example.com/description> "Bad Student" <http://example.com/graph/student> .

2.100 RMLTC0007a-CSV

Title: Typing resources by relying on rdf:type predicate

Description: Tests the typing resources by relying on rdf:type predicate

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@base <http://example.com/base/> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}"
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object foaf:Person; 
  ].

Error expected: No

Expected knowledge graph: (download)

 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.101 RMLTC0007a-JSON

Title: Typing resources by relying on rdf:type predicate

Description: Tests the typing resources by relying on rdf:type predicate

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}"
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object foaf:Person; 
  ].


Error expected: No

Expected knowledge graph: (download)

 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.102 RMLTC0007a-MySQL

Title: Typing resources by relying on rdf:type predicate

Description: Tests the typing resources by relying on rdf:type predicate

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1> a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [
    rr:template "http://example.com/Student/{ID}/{FirstName}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdf:type;
    rr:object foaf:Person;
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.103 RMLTC0007a-PostgreSQL

Title: Typing resources by relying on rdf:type predicate

Description: Tests the typing resources by relying on rdf:type predicate

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1> a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [
    rr:template "http://example.com/Student/{ID}/{FirstName}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdf:type;
    rr:object foaf:Person;
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.104 RMLTC0007a-SQLServer

Title: Typing resources by relying on rdf:type predicate

Description: Tests the typing resources by relying on rdf:type predicate

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1> a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [
    rr:template "http://example.com/Student/{ID}/{FirstName}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdf:type;
    rr:object foaf:Person;
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.105 RMLTC0007a-XML

Title: Typing resources by relying on rdf:type predicate

Description: Tests the typing resources by relying on rdf:type predicate

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}"
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object foaf:Person; 
  ].


Error expected: No

Expected knowledge graph: (download)

 <http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.106 RMLTC0007b-CSV

Title: Assigning triples to Named Graphs

Description: Tests the generation of triples to a named graph

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@base <http://example.com/base/> .

<TriplesMap1> a rr:TriplesMap;

  rml:logicalSource [
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph ex:PersonGraph
  ];

  rr:predicateObjectMap [
    rr:predicate rdf:type;
    rr:object foaf:Person;
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .

2.107 RMLTC0007b-JSON

Title: Assigning triples to Named Graphs

Description: Tests the generation of triples to a named graph

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph ex:PersonGraph
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object foaf:Person; 
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].



Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .

2.108 RMLTC0007b-MySQL

Title: Assigning triples to Named Graphs

Description: Tests the generation of triples to a named graph

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1> a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph ex:PersonGraph
  ];

  rr:predicateObjectMap [
    rr:predicate rdf:type;
    rr:object foaf:Person;
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .

2.109 RMLTC0007b-PostgreSQL

Title: Assigning triples to Named Graphs

Description: Tests the generation of triples to a named graph

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1> a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph ex:PersonGraph
  ];

  rr:predicateObjectMap [
    rr:predicate rdf:type;
    rr:object foaf:Person;
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .

2.110 RMLTC0007b-SQLServer

Title: Assigning triples to Named Graphs

Description: Tests the generation of triples to a named graph

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1> a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph ex:PersonGraph
  ];

  rr:predicateObjectMap [
    rr:predicate rdf:type;
    rr:object foaf:Person;
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .

2.111 RMLTC0007b-XML

Title: Assigning triples to Named Graphs

Description: Tests the generation of triples to a named graph

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph ex:PersonGraph
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object foaf:Person; 
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> . 
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  <http://example.com/PersonGraph> .

2.112 RMLTC0007c-CSV

Title: One row mapping, using rr:class

Description: Tests subjectmap with more than one class IRIs, rr:class

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:class foaf:Person, ex:Student
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID";  ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/Student/10/Venus> <http://example.com/id> "10" . 
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .

2.113 RMLTC0007c-JSON

Title: One row mapping, using rr:class

Description: Tests subjectmap with more than one class IRIs, rr:class

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:class foaf:Person, ex:Student
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID";  ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].



Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/Student/10/Venus> <http://example.com/id> "10" . 
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .

2.114 RMLTC0007c-MySQL

Title: One row mapping, using rr:class

Description: Tests subjectmap with more than one class IRIs, rr:class

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:class foaf:Person, ex:Student
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "\"ID\""; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .

2.115 RMLTC0007c-PostgreSQL

Title: One row mapping, using rr:class

Description: Tests subjectmap with more than one class IRIs, rr:class

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:class foaf:Person, ex:Student
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "\"ID\""; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .

2.116 RMLTC0007c-SQLServer

Title: One row mapping, using rr:class

Description: Tests subjectmap with more than one class IRIs, rr:class

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:class foaf:Person, ex:Student
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "\"ID\""; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .

2.117 RMLTC0007c-XML

Title: One row mapping, using rr:class

Description: Tests subjectmap with more than one class IRIs, rr:class

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:class foaf:Person, ex:Student
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID";  ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/Student/10/Venus> <http://example.com/id> "10" . 
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .

2.118 RMLTC0007d-CSV

Title: One column mapping, specifying an rr:predicateObjectMap with rdf:type

Description: Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}"
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object foaf:Person; 
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object ex:Student; 
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id;
    rr:objectMap [ rml:reference "ID" ]
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
<http://example.com/Student/10/Venus> <http://example.com/id> "10" .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .

2.119 RMLTC0007d-JSON

Title: One column mapping, specifying an rr:predicateObjectMap with rdf:type

Description: Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}"
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object foaf:Person; 
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object ex:Student; 
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id;
    rr:objectMap [rml:reference "ID"] 
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].



Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
<http://example.com/Student/10/Venus> <http://example.com/id> "10" .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .

2.120 RMLTC0007d-MySQL

Title: One column mapping, specifying an rr:predicateObjectMap with rdf:type

Description: Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [
    rr:template "http://example.com/Student/{ID}/{FirstName}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdf:type;
    rr:object foaf:Person;
  ];

  rr:predicateObjectMap [
    rr:predicate rdf:type;
    rr:object ex:Student;
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id;
    rml:reference "\"ID\"" 
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .

2.121 RMLTC0007d-PostgreSQL

Title: One column mapping, specifying an rr:predicateObjectMap with rdf:type

Description: Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [
    rr:template "http://example.com/Student/{ID}/{FirstName}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdf:type;
    rr:object foaf:Person;
  ];

  rr:predicateObjectMap [
    rr:predicate rdf:type;
    rr:object ex:Student;
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id;
    rml:reference "\"ID\"" 
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .

2.122 RMLTC0007d-SQLServer

Title: One column mapping, specifying an rr:predicateObjectMap with rdf:type

Description: Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [
    rr:template "http://example.com/Student/{ID}/{FirstName}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdf:type;
    rr:object foaf:Person;
  ];

  rr:predicateObjectMap [
    rr:predicate rdf:type;
    rr:object ex:Student;
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id;
    rml:reference "\"ID\"" 
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> . 
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .

2.123 RMLTC0007d-XML

Title: One column mapping, specifying an rr:predicateObjectMap with rdf:type

Description: Tests subjectmap with an alternative of having rr:class, i.e., by specifying an rr:predicateObjectMap with predicate rdf:type

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}"
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object foaf:Person; 
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object ex:Student; 
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id;
    rr:objectMap [rml:reference "ID"]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" . 
<http://example.com/Student/10/Venus> <http://example.com/id> "10" .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/Student> .

2.124 RMLTC0007e-CSV

Title: One column mapping, using rr:graphMap and rr:class

Description: Tests subjectmap with rr:graphMap and rr:class

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{Name}";
    rr:graph ex:PersonGraph ;
    rr:class foaf:Person
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID"; ]
  ];

  rr:predicateObjectMap
    [ 
      rr:predicate		foaf:name ;
      rr:objectMap		[ rml:reference "Name" ]
    ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .

2.125 RMLTC0007e-JSON

Title: One column mapping, using rr:graphMap and rr:class

Description: Tests subjectmap with rr:graphMap and rr:class

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{Name}";
    rr:graph ex:PersonGraph ;
    rr:class foaf:Person
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID"; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ].




Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .

2.126 RMLTC0007e-MySQL

Title: One column mapping, using rr:graphMap and rr:class

Description: Tests subjectmap with rr:graphMap and rr:class

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph ex:PersonGraph ;
    rr:class foaf:Person
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "\"ID\""; ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .

2.127 RMLTC0007e-PostgreSQL

Title: One column mapping, using rr:graphMap and rr:class

Description: Tests subjectmap with rr:graphMap and rr:class

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph ex:PersonGraph ;
    rr:class foaf:Person
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "\"ID\""; ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .

2.128 RMLTC0007e-SQLServer

Title: One column mapping, using rr:graphMap and rr:class

Description: Tests subjectmap with rr:graphMap and rr:class

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph ex:PersonGraph ;
    rr:class foaf:Person
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "\"ID\""; ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .

2.129 RMLTC0007e-XML

Title: One column mapping, using rr:graphMap and rr:class

Description: Tests subjectmap with rr:graphMap and rr:class

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{Name}";
    rr:graph ex:PersonGraph ;
    rr:class foaf:Person
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID"; ]
  ];

  rr:predicateObjectMap
    [ 
      rr:predicate		foaf:name ;
      rr:objectMap		[ rml:reference "Name" ]
    ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .

2.130 RMLTC0007f-CSV

Title: One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type

Description: Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph ex:PersonGraph
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object foaf:Person
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID";  ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .

2.131 RMLTC0007f-JSON

Title: One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type

Description: Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph ex:PersonGraph
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object foaf:Person
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID";  ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "FirstName" ]
  ].



Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .

2.132 RMLTC0007f-MySQL

Title: One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type

Description: Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph ex:PersonGraph
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object foaf:Person
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "\"ID\"";  ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "\"FirstName\"" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; 
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; 
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .

2.133 RMLTC0007f-PostgreSQL

Title: One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type

Description: Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph ex:PersonGraph
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object foaf:Person
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "\"ID\"";  ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "\"FirstName\"" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .

2.134 RMLTC0007f-SQLServer

Title: One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type

Description: Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph ex:PersonGraph
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object foaf:Person
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "\"ID\"";  ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "\"FirstName\"" ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/PersonGraph> .

2.135 RMLTC0007f-XML

Title: One column mapping, using rr:graphMap and specifying an rr:predicateObjectMap with rdf:type

Description: Tests subjectmap with rr:graphMap and specifying an rr:predicateObjectMap with predicate rdf:type

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph ex:PersonGraph
  ];

  rr:predicateObjectMap [ 
    rr:predicate rdf:type;
    rr:object foaf:Person
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID";  ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "FirstName" ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" <http://example.com/PersonGraph> .
<http://example.com/Student/10/Venus> <http://example.com/id> "10" <http://example.com/PersonGraph> .

2.136 RMLTC0007g-CSV

Title: Assigning triples to the default graph

Description: Tests the generation of triples to the default graph

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph rr:defaultGraph
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .

2.137 RMLTC0007g-JSON

Title: Assigning triples to the default graph

Description: Tests the generation of triples to the default graph

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph rr:defaultGraph
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ].



Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .

2.138 RMLTC0007g-MySQL

Title: Assigning triples to the default graph

Description: Tests the generation of triples to the default graph

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];


  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph rr:defaultGraph
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .

2.139 RMLTC0007g-PostgreSQL

Title: Assigning triples to the default graph

Description: Tests the generation of triples to the default graph

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];


  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph rr:defaultGraph
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .

2.140 RMLTC0007g-SQLServer

Title: Assigning triples to the default graph

Description: Tests the generation of triples to the default graph

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];


  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph rr:defaultGraph
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .

2.141 RMLTC0007g-XML

Title: Assigning triples to the default graph

Description: Tests the generation of triples to the default graph

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph rr:defaultGraph
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus> <http://xmlns.com/foaf/0.1/name> "Venus" .

2.142 RMLTC0007h-CSV

Title: Assigning triples to a non-IRI named graph

Description: Tests the generation of triples to a non-IRI named graph, which is an error

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph [ rml:reference "Name"; rr:termType rr:Literal; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

Error expected: No

Expected knowledge graph: (download)


            
        

2.143 RMLTC0007h-JSON

Title: Assigning triples to a non-IRI named graph

Description: Tests the generation of triples to a non-IRI named graph, which is an error

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph [ rml:reference "Name"; rr:termType rr:Literal; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "Name"
    ]
  ].



Error expected: No

Expected knowledge graph: (download)


            
        

2.144 RMLTC0007h-MySQL

Title: Assigning triples to a non-IRI named graph

Description: Tests the generation of triples to a non-IRI named graph, which is an error

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph [ rml:reference "Name"; rr:termType rr:Literal; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)


            
        

2.145 RMLTC0007h-PostgreSQL

Title: Assigning triples to a non-IRI named graph

Description: Tests the generation of triples to a non-IRI named graph, which is an error

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph [ rml:reference "Name"; rr:termType rr:Literal; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)


            
        

2.146 RMLTC0007h-SQLServer

Title: Assigning triples to a non-IRI named graph

Description: Tests the generation of triples to a non-IRI named graph, which is an error

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph [ rml:reference "Name"; rr:termType rr:Literal; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)


            
        

2.147 RMLTC0007h-XML

Title: Assigning triples to a non-IRI named graph

Description: Tests the generation of triples to a non-IRI named graph, which is an error

RML rules (download):

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

<TriplesMap1> a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{FirstName}";
    rr:graph [ rml:reference "Name"; rr:termType rr:Literal; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "Name"
    ]
  ].

Error expected: No

Expected knowledge graph: (download)


            
        

2.148 RMLTC0008a-CSV

Title: Generation of triples to a target graph by using rr:graphMap and rr:template

Description: Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template

RML rules (download):

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

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{Name}"; 
    rr:graphMap [ rr:template "http://example.com/graph/Student/{ID}/{Name}" ]
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdf:type ;
    rr:object foaf:Person; 
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:Sport ;
    rr:objectMap [ rml:reference "Sport" ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 

2.149 RMLTC0008a-JSON

Title: Generation of triples to a target graph by using rr:graphMap and rr:template

Description: Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template

RML rules (download):

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

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{Name}"; 
    rr:graphMap [ rr:template "http://example.com/graph/Student/{ID}/{Name}" ]
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdf:type ;
    rr:object foaf:Person; 
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:Sport ;
    rr:objectMap [ rml:reference "Sport" ]
  ] .


Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 

2.150 RMLTC0008a-MySQL

Title: Generation of triples to a target graph by using rr:graphMap and rr:template

Description: Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{Name}"; 
    rr:graphMap [ rr:template "http://example.com/graph/Student/{ID}/{Name}" ]
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdf:type ;
    rr:object foaf:Person; 
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:Sport ;
    rr:objectMap [ rml:reference "Sport" ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/Student/10/Venus%20Williams> . 
<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 


2.151 RMLTC0008a-PostgreSQL

Title: Generation of triples to a target graph by using rr:graphMap and rr:template

Description: Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{Name}"; 
    rr:graphMap [ rr:template "http://example.com/graph/Student/{ID}/{Name}" ]
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdf:type ;
    rr:object foaf:Person; 
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:Sport ;
    rr:objectMap [ rml:reference "Sport" ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/Student/10/Venus%20Williams> . 
<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 


2.152 RMLTC0008a-SQLServer

Title: Generation of triples to a target graph by using rr:graphMap and rr:template

Description: Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{Name}"; 
    rr:graphMap [ rr:template "http://example.com/graph/Student/{ID}/{Name}" ]
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdf:type ;
    rr:object foaf:Person; 
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:Sport ;
    rr:objectMap [ rml:reference "Sport" ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.com/graph/Student/10/Venus%20Williams> . 
<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 


2.153 RMLTC0008a-XML

Title: Generation of triples to a target graph by using rr:graphMap and rr:template

Description: Test that results of the mapping can be directed to a target graph by using rr:graphMap and rr:template

RML rules (download):

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

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/Student/{ID}/{Name}"; 
    rr:graphMap [ rr:template "http://example.com/graph/Student/{ID}/{Name}" ]
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdf:type ;
    rr:object foaf:Person; 
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate ex:Sport ;
    rr:objectMap [ rml:reference "Sport" ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> <http://example.com/graph/Student/10/Venus%20Williams> .
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/Student/10/Venus%20Williams> .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" <http://example.com/graph/Student/10/Venus%20Williams> . 
<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> "Tennis" <http://example.com/graph/Student/10/Venus%20Williams> . 

2.154 RMLTC0008b-CSV

Title: Generation of triples referencing object map

Description: Tests the mapping specification referencing object map without join

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap2>
  a rr:TriplesMap;
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/{Sport}" ];

  rr:predicateObjectMap [
    rr:predicate rdf:type ;
    rr:object activity:Sport ;
  ] .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/Student/{ID}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdf:type ;
    rr:object foaf:Person ;
  ];
		
  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID"; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ];
 
  rr:predicateObjectMap [ 
    rr:predicate ex:Sport ;
    rr:objectMap <RefObjectMap1>
  ] .

 
<RefObjectMap1>
  a rr:RefObjectMap;
  rr:parentTriplesMap <TriplesMap2> .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .


2.155 RMLTC0008b-JSON

Title: Generation of triples referencing object map

Description: Tests the mapping specification referencing object map without join

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap2>
  a rr:TriplesMap;
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ rr:template "http://example.com/{Sport}" ];

  rr:predicateObjectMap [
    rr:predicate rdf:type ;
    rr:object activity:Sport ;
  ] .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ rr:template "http://example.com/Student/{ID}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdf:type ;
    rr:object foaf:Person ;
  ];
		
  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID"; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ];
 
  rr:predicateObjectMap [ 
    rr:predicate ex:Sport ;
    rr:objectMap <RefObjectMap1>
  ] .

 
<RefObjectMap1>
  a rr:RefObjectMap;
  rr:parentTriplesMap <TriplesMap2> .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .


2.156 RMLTC0008b-MySQL

Title: Generation of triples referencing object map

Description: Tests the mapping specification referencing object map without join

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap2>
  a rr:TriplesMap;
    rml:logicalSource [
      rml:source <#DB_source>;
      rr:sqlVersion rr:SQL2008;
      rr:tableName "student";
  ];


  rr:subjectMap [ rr:template "http://example.com/{Sport}" ];

  rr:predicateObjectMap [
    rr:predicate rdf:type ;
    rr:object activity:Sport ;
  ] .

<TriplesMap1>
  a rr:TriplesMap;

    rml:logicalSource [
      rml:source <#DB_source>;
      rr:sqlVersion rr:SQL2008;
      rr:tableName "student";
  ];


  rr:subjectMap [ rr:template "http://example.com/Student/{ID}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdf:type ;
    rr:object foaf:Person ;
  ];
		
  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID"; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ];
 
  rr:predicateObjectMap [ 
    rr:predicate ex:Sport ;
    rr:objectMap <RefObjectMap1>
  ] .

<RefObjectMap1>
  a rr:RefObjectMap;
  rr:parentTriplesMap <TriplesMap2> .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer>  . 
<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .


2.157 RMLTC0008b-PostgreSQL

Title: Generation of triples referencing object map

Description: Tests the mapping specification referencing object map without join

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap2>
  a rr:TriplesMap;
    rml:logicalSource [
      rml:source <#DB_source>;
      rr:sqlVersion rr:SQL2008;
      rr:tableName "student";
  ];


  rr:subjectMap [ rr:template "http://example.com/{Sport}" ];

  rr:predicateObjectMap [
    rr:predicate rdf:type ;
    rr:object activity:Sport ;
  ] .

<TriplesMap1>
  a rr:TriplesMap;

    rml:logicalSource [
      rml:source <#DB_source>;
      rr:sqlVersion rr:SQL2008;
      rr:tableName "student";
  ];


  rr:subjectMap [ rr:template "http://example.com/Student/{ID}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdf:type ;
    rr:object foaf:Person ;
  ];
		
  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID"; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ];
 
  rr:predicateObjectMap [ 
    rr:predicate ex:Sport ;
    rr:objectMap <RefObjectMap1>
  ] .

 
<RefObjectMap1>
  a rr:RefObjectMap;
  rr:parentTriplesMap <TriplesMap2> .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer>  . 
<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .


2.158 RMLTC0008b-SQLServer

Title: Generation of triples referencing object map

Description: Tests the mapping specification referencing object map without join

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap2>
  a rr:TriplesMap;
    rml:logicalSource [
      rml:source <#DB_source>;
      rr:sqlVersion rr:SQL2008;
      rr:tableName "student";
  ];


  rr:subjectMap [ rr:template "http://example.com/{Sport}" ];

  rr:predicateObjectMap [
    rr:predicate rdf:type ;
    rr:object activity:Sport ;
  ] .

<TriplesMap1>
  a rr:TriplesMap;

    rml:logicalSource [
      rml:source <#DB_source>;
      rr:sqlVersion rr:SQL2008;
      rr:tableName "student";
  ];


  rr:subjectMap [ rr:template "http://example.com/Student/{ID}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdf:type ;
    rr:object foaf:Person ;
  ];
		
  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID"; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ];
 
  rr:predicateObjectMap [ 
    rr:predicate ex:Sport ;
    rr:objectMap <RefObjectMap1>
  ] .

 
<RefObjectMap1>
  a rr:RefObjectMap;
  rr:parentTriplesMap <TriplesMap2> .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer>  . 
<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .


2.159 RMLTC0008b-XML

Title: Generation of triples referencing object map

Description: Tests the mapping specification referencing object map without join

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap2>
  a rr:TriplesMap;
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ rr:template "http://example.com/{Sport}" ];

  rr:predicateObjectMap [
    rr:predicate rdf:type ;
    rr:object activity:Sport ;
  ] .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ rr:template "http://example.com/Student/{ID}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdf:type ;
    rr:object foaf:Person ;
  ];
		
  rr:predicateObjectMap [ 
    rr:predicate ex:id ;
    rr:objectMap [ rml:reference "ID"; ]
  ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ];
 
  rr:predicateObjectMap [ 
    rr:predicate ex:Sport ;
    rr:objectMap <RefObjectMap1>
  ] .

 
<RefObjectMap1>
  a rr:RefObjectMap;
  rr:parentTriplesMap <TriplesMap2> .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>  .
<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/id> "10" . 
<http://example.com/Student/10/Venus%20Williams> <http://example.com/Sport> <http://example.com/Tennis> . 
<http://example.com/Tennis> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/activity/Sport> .


2.160 RMLTC0008c-CSV

Title: Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap

Description: Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/Student/{ID}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .

2.161 RMLTC0008c-JSON

Title: Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap

Description: Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ rr:template "http://example.com/Student/{ID}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .

2.162 RMLTC0008c-MySQL

Title: Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap

Description: Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];


  rr:subjectMap [ rr:template "http://example.com/Student/{ID}/{Name}" ];

  rr:predicateObjectMap [
    rr:predicate foaf:name ;
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .

2.163 RMLTC0008c-PostgreSQL

Title: Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap

Description: Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];


  rr:subjectMap [ rr:template "http://example.com/Student/{ID}/{Name}" ];

  rr:predicateObjectMap [
    rr:predicate foaf:name ;
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .

2.164 RMLTC0008c-SQLServer

Title: Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap

Description: Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];


  rr:subjectMap [ rr:template "http://example.com/Student/{ID}/{Name}" ];

  rr:predicateObjectMap [
    rr:predicate foaf:name ;
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .

2.165 RMLTC0008c-XML

Title: Generation of triples by using multiple predicateMaps within a rr:predicateObjectMap

Description: Tests the generation of triples by using multiple predicateMaps within a rr:predicateObjectMap

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ rr:template "http://example.com/Student/{ID}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Student/10/Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
<http://example.com/Student/10/Venus%20Williams> <http://example.com/name> "Venus Williams"  .

2.166 RMLTC0009a-CSV

Title: Generation of triples from foreign key relations

Description: Test foreign key relationships among logical tables

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/student_{ID}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] ;

  rr:predicateObjectMap [ 
    rr:predicate <http://example.com/ontology/practises> ;
    rr:objectMap [ 
      a rr:RefObjectMap ;
      rr:parentTriplesMap <TriplesMap2>;
      rr:joinCondition [
        rr:child "Sport" ;
        rr:parent "ID" ;
      ]
    ]
  ] .

<TriplesMap2>
  a rr:TriplesMap;
		
  rml:logicalSource [ 
    rml:source "sport.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/sport_{ID}" ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ; 
    rr:objectMap [ rml:reference "Name" ];
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .

2.167 RMLTC0009a-JSON

Title: Generation of triples from foreign key relations

Description: Test foreign key relationships among logical tables

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/student_{ID}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] ;

  rr:predicateObjectMap [ 
    rr:predicate <http://example.com/ontology/practises> ;
    rr:objectMap [ 
      a rr:RefObjectMap ;
      rr:parentTriplesMap <TriplesMap2>;
      rr:joinCondition [
        rr:child "Sport" ;
        rr:parent "ID" ;
      ]
    ]
  ] .

<TriplesMap2>
  a rr:TriplesMap;
		
  rml:logicalSource [ 
    rml:source "sport.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.sports[*]"
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/sport_{ID}" ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ; 
    rr:objectMap [ rml:reference "Name" ];
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .

2.168 RMLTC0009a-MySQL

Title: Generation of triples from foreign key relations

Description: Test foreign key relationships among logical tables

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/student_{ID}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] ;

  rr:predicateObjectMap [ 
    rr:predicate <http://example.com/ontology/practises> ;
    rr:objectMap [ 
      a rr:RefObjectMap ;
      rr:parentTriplesMap <TriplesMap2>;
      rr:joinCondition [
        rr:child "Sport" ;
        rr:parent "ID" ;
      ]
    ]
  ] .

<TriplesMap2>
  a rr:TriplesMap;
		
    rml:logicalSource [
      rml:source <#DB_source>;
      rr:sqlVersion rr:SQL2008;
      rr:tableName "sport";
    ];

  rr:subjectMap [ rr:template "http://example.com/resource/sport_{ID}" ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ; 
    rr:objectMap [ rml:reference "Name" ];
  ].


<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .

2.169 RMLTC0009a-PostgreSQL

Title: Generation of triples from foreign key relations

Description: Test foreign key relationships among logical tables

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/student_{ID}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] ;

  rr:predicateObjectMap [ 
    rr:predicate <http://example.com/ontology/practises> ;
    rr:objectMap [ 
      a rr:RefObjectMap ;
      rr:parentTriplesMap <TriplesMap2>;
      rr:joinCondition [
        rr:child "Sport" ;
        rr:parent "ID" ;
      ]
    ]
  ] .

<TriplesMap2>
  a rr:TriplesMap;
		
    rml:logicalSource [
      rml:source <#DB_source>;
      rr:sqlVersion rr:SQL2008;
      rr:tableName "sport";
    ];

  rr:subjectMap [ rr:template "http://example.com/resource/sport_{ID}" ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ; 
    rr:objectMap [ rml:reference "Name" ];
  ].


<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .

2.170 RMLTC0009a-SQLServer

Title: Generation of triples from foreign key relations

Description: Test foreign key relationships among logical tables

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/student_{ID}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] ;

  rr:predicateObjectMap [ 
    rr:predicate <http://example.com/ontology/practises> ;
    rr:objectMap [ 
      a rr:RefObjectMap ;
      rr:parentTriplesMap <TriplesMap2>;
      rr:joinCondition [
        rr:child "Sport" ;
        rr:parent "ID" ;
      ]
    ]
  ] .

<TriplesMap2>
  a rr:TriplesMap;
		
    rml:logicalSource [
      rml:source <#DB_source>;
      rr:sqlVersion rr:SQL2008;
      rr:tableName "sport";
    ];

  rr:subjectMap [ rr:template "http://example.com/resource/sport_{ID}" ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ; 
    rr:objectMap [ rml:reference "Name" ];
  ].


<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .

2.171 RMLTC0009a-XML

Title: Generation of triples from foreign key relations

Description: Test foreign key relationships among logical tables

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/student_{ID}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] ;

  rr:predicateObjectMap [ 
    rr:predicate <http://example.com/ontology/practises> ;
    rr:objectMap [ 
      a rr:RefObjectMap ;
      rr:parentTriplesMap <TriplesMap2>;
      rr:joinCondition [
        rr:child "Sport" ;
        rr:parent "ID" ;
      ]
    ]
  ] .

<TriplesMap2>
  a rr:TriplesMap;
		
  rml:logicalSource [ 
    rml:source "sport.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/sports/sport"
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/sport_{ID}" ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ; 
    rr:objectMap [ rml:reference "Name" ];
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams"  .
<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore"  .
<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100>  .

2.172 RMLTC0009b-CSV

Title: Generation of triples to multiple graphs

Description: Test that results from distinct parts of the mapping can be directed to different target graphs.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/resource/student_{ID}" ;
    rr:class <http://example.com/ontology/Student>;
    rr:graph <http://example.com/graph/students> ;
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ];
    rr:graph <http://example.com/graph/students> ;
  ] ;

  rr:predicateObjectMap [ 
    rr:predicate <http://example.com/ontology/practises> ;
    rr:objectMap [ 
      a rr:RefObjectMap ;
      rr:parentTriplesMap <TriplesMap2>;
      rr:joinCondition [
        rr:child "Sport" ;
        rr:parent "ID" ;
      ]
    ];
    rr:graph <http://example.com/graph/practise> ;
  ] .

<TriplesMap2>
  a rr:TriplesMap;
		
  rml:logicalSource [ 
    rml:source "sport.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/resource/sport_{ID}";
    rr:class <http://example.com/ontology/Sport>;
    rr:graph <http://example.com/graph/sports> ;
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ; 
    rr:objectMap [ rml:reference "Name" ];
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .

2.173 RMLTC0009b-JSON

Title: Generation of triples to multiple graphs

Description: Test that results from distinct parts of the mapping can be directed to different target graphs.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/student_{ID}";
    rr:class <http://example.com/ontology/Student>;
    rr:graph <http://example.com/graph/students> ;
 ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ];
    rr:graph <http://example.com/graph/students> ;
  ] ;

  rr:predicateObjectMap [ 
    rr:predicate <http://example.com/ontology/practises> ;
    rr:objectMap [ 
      a rr:RefObjectMap ;
      rr:parentTriplesMap <TriplesMap2>;
      rr:joinCondition [
        rr:child "Sport" ;
        rr:parent "ID" ;
      ]
    ];
    rr:graph <http://example.com/graph/practise> ;
  ] .

<TriplesMap2>
  a rr:TriplesMap;
		
  rml:logicalSource [ 
    rml:source "sport.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.sports[*]"
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/sport_{ID}";
    rr:class <http://example.com/ontology/Sport>;
    rr:graph <http://example.com/graph/sports> ;
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ; 
    rr:objectMap [ rml:reference "Name" ];
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .

2.174 RMLTC0009b-MySQL

Title: Generation of triples to multiple graphs

Description: Test that results from distinct parts of the mapping can be directed to different target graphs.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/resource/student_{ID}" ;
    rr:class <http://example.com/ontology/Student>;
    rr:graph <http://example.com/graph/students> ;
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ];
    rr:graph <http://example.com/graph/students> ;
  ] ;

  rr:predicateObjectMap [ 
    rr:predicate <http://example.com/ontology/practises> ;
    rr:objectMap [ 
      a rr:RefObjectMap ;
      rr:parentTriplesMap <TriplesMap2>;
      rr:joinCondition [
        rr:child "Sport" ;
        rr:parent "ID" ;
      ]
    ];
    rr:graph <http://example.com/graph/practise> ;
  ] .

<TriplesMap2>
  a rr:TriplesMap;
		
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "sport";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/resource/sport_{ID}";
    rr:class <http://example.com/ontology/Sport>;
    rr:graph <http://example.com/graph/sports> ;
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ; 
    rr:objectMap [ rml:reference "Name" ];
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .

2.175 RMLTC0009b-PostgreSQL

Title: Generation of triples to multiple graphs

Description: Test that results from distinct parts of the mapping can be directed to different target graphs.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/resource/student_{ID}" ;
    rr:class <http://example.com/ontology/Student>;
    rr:graph <http://example.com/graph/students> ;
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ];
    rr:graph <http://example.com/graph/students> ;
  ] ;

  rr:predicateObjectMap [ 
    rr:predicate <http://example.com/ontology/practises> ;
    rr:objectMap [ 
      a rr:RefObjectMap ;
      rr:parentTriplesMap <TriplesMap2>;
      rr:joinCondition [
        rr:child "Sport" ;
        rr:parent "ID" ;
      ]
    ];
    rr:graph <http://example.com/graph/practise> ;
  ] .

<TriplesMap2>
  a rr:TriplesMap;
		
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "sport";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/resource/sport_{ID}";
    rr:class <http://example.com/ontology/Sport>;
    rr:graph <http://example.com/graph/sports> ;
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ; 
    rr:objectMap [ rml:reference "Name" ];
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .

2.176 RMLTC0009b-SQLServer

Title: Generation of triples to multiple graphs

Description: Test that results from distinct parts of the mapping can be directed to different target graphs.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/resource/student_{ID}" ;
    rr:class <http://example.com/ontology/Student>;
    rr:graph <http://example.com/graph/students> ;
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ];
    rr:graph <http://example.com/graph/students> ;
  ] ;

  rr:predicateObjectMap [ 
    rr:predicate <http://example.com/ontology/practises> ;
    rr:objectMap [ 
      a rr:RefObjectMap ;
      rr:parentTriplesMap <TriplesMap2>;
      rr:joinCondition [
        rr:child "Sport" ;
        rr:parent "ID" ;
      ]
    ];
    rr:graph <http://example.com/graph/practise> ;
  ] .

<TriplesMap2>
  a rr:TriplesMap;
		
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "sport";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/resource/sport_{ID}";
    rr:class <http://example.com/ontology/Sport>;
    rr:graph <http://example.com/graph/sports> ;
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ; 
    rr:objectMap [ rml:reference "Name" ];
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .

2.177 RMLTC0009b-XML

Title: Generation of triples to multiple graphs

Description: Test that results from distinct parts of the mapping can be directed to different target graphs.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

  rr:subjectMap [
    rr:template "http://example.com/resource/student_{ID}";
    rr:class <http://example.com/ontology/Student>;
    rr:graph <http://example.com/graph/students> ;
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ;
    rr:objectMap [ rml:reference "Name" ];
    rr:graph <http://example.com/graph/students> ;
  ] ;

  rr:predicateObjectMap [ 
    rr:predicate <http://example.com/ontology/practises> ;
    rr:objectMap [ 
      a rr:RefObjectMap ;
      rr:parentTriplesMap <TriplesMap2>;
      rr:joinCondition [
        rr:child "Sport" ;
        rr:parent "ID" ;
      ]
    ];
    rr:graph <http://example.com/graph/practise> ;
  ] .

<TriplesMap2>
  a rr:TriplesMap;
		
  rml:logicalSource [ 
    rml:source "sport.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/sports/sport"
  ];

  rr:subjectMap [
    rr:template "http://example.com/resource/sport_{ID}";
    rr:class <http://example.com/ontology/Sport>;
    rr:graph <http://example.com/graph/sports> ;
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ; 
    rr:objectMap [ rml:reference "Name" ];
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
<http://example.com/resource/student_10> <http://xmlns.com/foaf/0.1/name> "Venus Williams" <http://example.com/graph/students> .
<http://example.com/resource/student_20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Student> <http://example.com/graph/students> .
<http://example.com/resource/student_20> <http://xmlns.com/foaf/0.1/name> "Demi Moore" <http://example.com/graph/students> .
<http://example.com/resource/sport_100> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/ontology/Sport> <http://example.com/graph/sports> .
<http://example.com/resource/sport_100> <http://www.w3.org/2000/01/rdf-schema#label> "Tennis" <http://example.com/graph/sports> .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/practise> .
<http://example.com/resource/student_10> <http://example.com/ontology/practises> <http://example.com/resource/sport_100> <http://example.com/graph/students> .

2.178 RMLTC0009c-MySQL

Title: Unnamed column in a logical table

Description: Test a logical table with unnamed column.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query """
        SELECT "Name", COUNT("Sport")
        FROM "Student"
        GROUP BY "Name"
        """ ];
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/student_{\"Name\"}"; ]; 
	
    rr:predicateObjectMap
    [ 
      rr:predicate	foaf:name ; 
      rr:objectMap	[ rml:reference "\"Name\""; ];
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; 
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 


2.179 RMLTC0009c-PostgreSQL

Title: Unnamed column in a logical table

Description: Test a logical table with unnamed column.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query """
        SELECT "Name", COUNT("Sport")
        FROM "Student"
        GROUP BY "Name"
        """ ];
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/student_{\"Name\"}"; ]; 
	
    rr:predicateObjectMap
    [ 
      rr:predicate	foaf:name ; 
      rr:objectMap	[ rml:reference "\"Name\""; ];
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 


2.180 RMLTC0009c-SQLServer

Title: Unnamed column in a logical table

Description: Test a logical table with unnamed column.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query """
        SELECT "Name", COUNT("Sport")
        FROM "Student"
        GROUP BY "Name"
        """ ];
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/student_{\"Name\"}"; ]; 
	
    rr:predicateObjectMap
    [ 
      rr:predicate	foaf:name ; 
      rr:objectMap	[ rml:reference "\"Name\""; ];
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 


2.181 RMLTC0009d-MySQL

Title: Named column in logical table

Description: Test a logical table named column.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query """
        SELECT "Name", COUNT("Sport") as SPORTCOUNT
        FROM "Student"
        GROUP BY "Name"
        """ ];
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/student_{\"Name\"}"; ]; 
	
    rr:predicateObjectMap
    [ 
      rr:predicate	foaf:name ; 
      rr:objectMap	[ rml:reference "\"Name\""; ];
    ];

    rr:predicateObjectMap
    [ 
		rr:predicate	ex:numSport ; 
		rr:objectMap	[ rml:reference "SPORTCOUNT"; ];
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; 
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
<http://example.com/resource/student_Venus%20Williams> <http://example.com/numSport> "1"^^<http://www.w3.org/2001/XMLSchema#integer> . 
<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 
<http://example.com/resource/student_Demi%20Moore> <http://example.com/numSport> "0"^^<http://www.w3.org/2001/XMLSchema#integer> . 



2.182 RMLTC0009d-PostgreSQL

Title: Named column in logical table

Description: Test a logical table named column.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query """
        SELECT "Name", COUNT("Sport") as SPORTCOUNT
        FROM "Student"
        GROUP BY "Name"
        """ ];
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/student_{\"Name\"}"; ]; 
	
    rr:predicateObjectMap
    [ 
      rr:predicate	foaf:name ; 
      rr:objectMap	[ rml:reference "\"Name\""; ];
    ];

    rr:predicateObjectMap
    [ 
		rr:predicate	ex:numSport ; 
		rr:objectMap	[ rml:reference "SPORTCOUNT"; ];
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
<http://example.com/resource/student_Venus%20Williams> <http://example.com/numSport> "1"^^<http://www.w3.org/2001/XMLSchema#integer> . 
<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 
<http://example.com/resource/student_Demi%20Moore> <http://example.com/numSport> "0"^^<http://www.w3.org/2001/XMLSchema#integer> . 



2.183 RMLTC0009d-SQLServer

Title: Named column in logical table

Description: Test a logical table named column.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query """
        SELECT "Name", COUNT("Sport") as SPORTCOUNT
        FROM "Student"
        GROUP BY "Name"
        """ ];
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/resource/student_{\"Name\"}"; ]; 
	
    rr:predicateObjectMap
    [ 
      rr:predicate	foaf:name ; 
      rr:objectMap	[ rml:reference "\"Name\""; ];
    ];

    rr:predicateObjectMap
    [ 
		rr:predicate	ex:numSport ; 
		rr:objectMap	[ rml:reference "SPORTCOUNT"; ];
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/resource/student_Venus%20Williams> <http://xmlns.com/foaf/0.1/name> "Venus Williams" . 
<http://example.com/resource/student_Venus%20Williams> <http://example.com/numSport> "1"^^<http://www.w3.org/2001/XMLSchema#integer> . 
<http://example.com/resource/student_Demi%20Moore> <http://xmlns.com/foaf/0.1/name> "Demi Moore" . 
<http://example.com/resource/student_Demi%20Moore> <http://example.com/numSport> "0"^^<http://www.w3.org/2001/XMLSchema#integer> . 



2.184 RMLTC0010a-CSV

Title: Template with table column with special chars

Description: Tests a template with blank space in column value

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "country info.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/{Country Code}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
<http://example.com/2> <http://example.com/name> "Ireland" .
<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .

2.185 RMLTC0010a-JSON

Title: Template with table column with special chars

Description: Tests a template with blank space in column value

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "country info.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.countries[*]"
  ];

  rr:subjectMap [ rr:template "http://example.com/{Country Code}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
<http://example.com/2> <http://example.com/name> "Ireland" .
<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .

2.186 RMLTC0010a-MySQL

Title: Template with table column with special chars

Description: Tests a template with blank space in column value

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "country_info";
  ];

  rr:subjectMap [ rr:template "http://example.com/{Country Code}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .


<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
<http://example.com/2> <http://example.com/name> "Ireland" .
<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .

2.187 RMLTC0010a-PostgreSQL

Title: Template with table column with special chars

Description: Tests a template with blank space in column value

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "country_info";
  ];

  rr:subjectMap [ rr:template "http://example.com/{Country Code}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
<http://example.com/2> <http://example.com/name> "Ireland" .
<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .

2.188 RMLTC0010a-SQLServer

Title: Template with table column with special chars

Description: Tests a template with blank space in column value

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "country_info";
  ];

  rr:subjectMap [ rr:template "http://example.com/{Country Code}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1> <http://example.com/name> "Bolivia, Plurinational State of" .
<http://example.com/2> <http://example.com/name> "Ireland" .
<http://example.com/3> <http://example.com/name> "Saint Martin (French part)" .

2.189 RMLTC0010b-CSV

Title: Template with table columns with special chars

Description: Tests a template with special chars in column value

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "country info.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/{Country Code}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .

2.190 RMLTC0010b-JSON

Title: Template with table columns with special chars

Description: Tests a template with special chars in column value

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "country info.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.countries[*]"
  ];

  rr:subjectMap [ rr:template "http://example.com/{Country Code}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .

2.191 RMLTC0010b-MySQL

Title: Template with table columns with special chars

Description: Tests a template with special chars in column value

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "country_info";
  ];

  rr:subjectMap [ rr:template "http://example.com/{Country Code}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .

2.192 RMLTC0010b-PostgreSQL

Title: Template with table columns with special chars

Description: Tests a template with special chars in column value

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "country_info";
  ];

  rr:subjectMap [ rr:template "http://example.com/{Country Code}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .

2.193 RMLTC0010b-SQLServer

Title: Template with table columns with special chars

Description: Tests a template with special chars in column value

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "country_info";
  ];

  rr:subjectMap [ rr:template "http://example.com/{Country Code}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .

2.194 RMLTC0010b-XML

Title: Template with table columns with special chars

Description: Tests a template with special chars in column value

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "country info.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/countries/country"
  ];

  rr:subjectMap [ rr:template "http://example.com/{CountryCode}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:name ;
    rr:objectMap [ rml:reference "Name" ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/name> "Bolivia, Plurinational State of" .
<http://example.com/2/Ireland> <http://example.com/name> "Ireland" .
<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/name> "Saint Martin (French part)" .

2.195 RMLTC0010c-CSV

Title: Template with table columns with special chars and backslashes

Description: Tests a template with special chars in column value and backslash escapes in string templates

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "country info.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/{Country Code}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:code ;
    rr:objectMap [ rr:template "\{\{\{ {ISO 3166} \}\}\}"; rr:termType rr:Literal]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .

2.196 RMLTC0010c-JSON

Title: Template with table columns with special chars and backslashes

Description: Tests a template with special chars in column value and backslash escapes in string templates

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "country info.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.countries[*]"
  ];

  rr:subjectMap [ rr:template "http://example.com/{Country Code}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:code ;
    rr:objectMap [ rr:template "\{\{\{ {ISO 3166} \}\}\}"; rr:termType rr:Literal]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .

2.197 RMLTC0010c-MySQL

Title: Template with table columns with special chars and backslashes

Description: Tests a template with special chars in column value and backslash escapes in string templates

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "country_info";
  ];

  rr:subjectMap [ rr:template "http://example.com/{Country Code}/{Name}" ];

  rr:predicateObjectMap [
    rr:predicate ex:code ;
    rr:objectMap [ rr:template "\{\{\{ {ISO 3166} \}\}\}"; rr:termType rr:Literal]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; 
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .

2.198 RMLTC0010c-PostgreSQL

Title: Template with table columns with special chars and backslashes

Description: Tests a template with special chars in column value and backslash escapes in string templates

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "country_info";
  ];

  rr:subjectMap [ rr:template "http://example.com/{Country Code}/{Name}" ];

  rr:predicateObjectMap [
    rr:predicate ex:code ;
    rr:objectMap [ rr:template "\{\{\{ {ISO 3166} \}\}\}"; rr:termType rr:Literal]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .

2.199 RMLTC0010c-SQLServer

Title: Template with table columns with special chars and backslashes

Description: Tests a template with special chars in column value and backslash escapes in string templates

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "country_info";
  ];

  rr:subjectMap [ rr:template "http://example.com/{Country Code}/{Name}" ];

  rr:predicateObjectMap [
    rr:predicate ex:code ;
    rr:objectMap [ rr:template "\{\{\{ {ISO 3166} \}\}\}"; rr:termType rr:Literal]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .

2.200 RMLTC0010c-XML

Title: Template with table columns with special chars and backslashes

Description: Tests a template with special chars in column value and backslash escapes in string templates

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix activity: <http://example.com/activity/> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "country info.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/countries/country"
  ];

  rr:subjectMap [ rr:template "http://example.com/{CountryCode}/{Name}" ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:code ;
    rr:objectMap [ rr:template "\{\{\{ {ISO3166} \}\}\}"; rr:termType rr:Literal]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/1/Bolivia%2C%20Plurinational%20State%20of> <http://example.com/code> "{{{ BO }}}" .
<http://example.com/2/Ireland> <http://example.com/code> "{{{ IE }}}" .
<http://example.com/3/Saint%20Martin%20%28French%20part%29> <http://example.com/code> "{{{ MF }}}" .

2.201 RMLTC0011a-MySQL

Title: M to M relation, by using a SQL query

Description: Tests, M to M relations, by using a SQL query

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
    a rr:TriplesMap;

    rml:logicalSource [ 
       rml:source <#DB_source>;
       rr:sqlVersion rr:SQL2008;
       rml:query """
       SELECT "Student"."ID" as ID,
              "Student"."FirstName" as FirstName,
              "Student"."LastName" as LastName,
              "Sport"."Description" as Description,
              "Sport"."ID" as Sport_ID
       FROM "Student","Sport","Student_Sport"
       WHERE "Student"."ID" = "Student_Sport"."ID_Student"
       AND "Sport"."ID" = "Student_Sport"."ID_Sport";
       """; ];

    rr:subjectMap [ rr:template "http://example.com/{ID}/{FirstName};{LastName}" ];
	
    rr:predicateObjectMap
    [ 
      rr:predicate	ex:id ; 
      rr:objectMap	[ rml:reference "ID"; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate	ex:firstName ; 
      rr:objectMap	[ rml:reference "FirstName" ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate	ex:lastName ; 
      rr:objectMap	[ rml:reference "LastName" ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate	ex:plays ; 
      rr:objectMap	[ rr:template "http://example.com/{Sport_ID}/{Description}" ]
    ]
    .

<TriplesMap2>
    a rr:TriplesMap;

	rr:logicalTable [ rr:tableName  "\"Sport\"" ];
	
    rr:subjectMap [ rr:template "http://example.com/{\"ID\"}/{\"Description\"}"; ];

    rr:predicateObjectMap
    [ 
      rr:predicate	ex:id ; 
      rr:objectMap	[ rml:reference "\"ID\""; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate	ex:description ; 
      rr:objectMap	[ rml:reference "\"Description\"" ]
    ]
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; 
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/110/Tennis> <http://example.com/description> "Tennis" .
<http://example.com/110/Tennis> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/10/Venus;Williams> <http://example.com/plays> <http://example.com/110/Tennis> .
<http://example.com/10/Venus;Williams> <http://example.com/lastName> "Williams" .
<http://example.com/10/Venus;Williams> <http://example.com/firstName> "Venus" .
<http://example.com/10/Venus;Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/111/Football> <http://example.com/description> "Football" .
<http://example.com/111/Football> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/12/David;Villa> <http://example.com/plays> <http://example.com/111/Football> .
<http://example.com/12/David;Villa> <http://example.com/lastName> "Villa" .
<http://example.com/12/David;Villa> <http://example.com/firstName> "David" .
<http://example.com/12/David;Villa> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/112/Formula1> <http://example.com/description> "Formula1" .
<http://example.com/112/Formula1> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/11/Fernando;Alonso> <http://example.com/lastName> "Alonso" .
<http://example.com/11/Fernando;Alonso> <http://example.com/firstName> "Fernando" .
<http://example.com/11/Fernando;Alonso> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/111/Football> .
<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/112/Formula1> .

2.202 RMLTC0011a-PostgreSQL

Title: M to M relation, by using a SQL query

Description: Tests, M to M relations, by using a SQL query

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
    a rr:TriplesMap;

    rml:logicalSource [ 
      rml:source <#DB_source>;
      rr:sqlVersion rr:SQL2008;
      rml:query """
       SELECT "Student"."ID" as ID,
              "Student"."FirstName" as FirstName,
              "Student"."LastName" as LastName,
              "Sport"."Description" as Description,
              "Sport"."ID" as Sport_ID
       FROM "Student","Sport","Student_Sport"
       WHERE "Student"."ID" = "Student_Sport"."ID_Student"
       AND "Sport"."ID" = "Student_Sport"."ID_Sport";
       """; ];

    rr:subjectMap [ rr:template "http://example.com/{ID}/{FirstName};{LastName}" ];
	
    rr:predicateObjectMap
    [ 
      rr:predicate	ex:id ; 
      rr:objectMap	[ rml:reference "ID"; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate	ex:firstName ; 
      rr:objectMap	[ rml:reference "FirstName" ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate	ex:lastName ; 
      rr:objectMap	[ rml:reference "LastName" ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate	ex:plays ; 
      rr:objectMap	[ rr:template "http://example.com/{Sport_ID}/{Description}" ]
    ]
    .

<TriplesMap2>
    a rr:TriplesMap;

	rr:logicalTable [ rr:tableName  "\"Sport\"" ];
	
    rr:subjectMap [ rr:template "http://example.com/{\"ID\"}/{\"Description\"}"; ];

    rr:predicateObjectMap
    [ 
      rr:predicate	ex:id ; 
      rr:objectMap	[ rml:reference "\"ID\""; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate	ex:description ; 
      rr:objectMap	[ rml:reference "\"Description\"" ]
    ]
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/110/Tennis> <http://example.com/description> "Tennis" .
<http://example.com/110/Tennis> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/10/Venus;Williams> <http://example.com/plays> <http://example.com/110/Tennis> .
<http://example.com/10/Venus;Williams> <http://example.com/lastName> "Williams" .
<http://example.com/10/Venus;Williams> <http://example.com/firstName> "Venus" .
<http://example.com/10/Venus;Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/111/Football> <http://example.com/description> "Football" .
<http://example.com/111/Football> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/12/David;Villa> <http://example.com/plays> <http://example.com/111/Football> .
<http://example.com/12/David;Villa> <http://example.com/lastName> "Villa" .
<http://example.com/12/David;Villa> <http://example.com/firstName> "David" .
<http://example.com/12/David;Villa> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/112/Formula1> <http://example.com/description> "Formula1" .
<http://example.com/112/Formula1> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/11/Fernando;Alonso> <http://example.com/lastName> "Alonso" .
<http://example.com/11/Fernando;Alonso> <http://example.com/firstName> "Fernando" .
<http://example.com/11/Fernando;Alonso> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/111/Football> .
<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/112/Formula1> .

2.203 RMLTC0011a-SQLServer

Title: M to M relation, by using a SQL query

Description: Tests, M to M relations, by using a SQL query

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
    a rr:TriplesMap;

    rml:logicalSource [ 
      rml:source <#DB_source>;
      rr:sqlVersion rr:SQL2008;
      rml:query """
       SELECT "Student"."ID" as ID,
              "Student"."FirstName" as FirstName,
              "Student"."LastName" as LastName,
              "Sport"."Description" as Description,
              "Sport"."ID" as Sport_ID
       FROM "Student","Sport","Student_Sport"
       WHERE "Student"."ID" = "Student_Sport"."ID_Student"
       AND "Sport"."ID" = "Student_Sport"."ID_Sport";
       """; ];

    rr:subjectMap [ rr:template "http://example.com/{ID}/{FirstName};{LastName}" ];
	
    rr:predicateObjectMap
    [ 
      rr:predicate	ex:id ; 
      rr:objectMap	[ rml:reference "ID"; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate	ex:firstName ; 
      rr:objectMap	[ rml:reference "FirstName" ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate	ex:lastName ; 
      rr:objectMap	[ rml:reference "LastName" ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate	ex:plays ; 
      rr:objectMap	[ rr:template "http://example.com/{Sport_ID}/{Description}" ]
    ]
    .

<TriplesMap2>
    a rr:TriplesMap;

	rr:logicalTable [ rr:tableName  "\"Sport\"" ];
	
    rr:subjectMap [ rr:template "http://example.com/{\"ID\"}/{\"Description\"}"; ];

    rr:predicateObjectMap
    [ 
      rr:predicate	ex:id ; 
      rr:objectMap	[ rml:reference "\"ID\""; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate	ex:description ; 
      rr:objectMap	[ rml:reference "\"Description\"" ]
    ]
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/110/Tennis> <http://example.com/description> "Tennis" .
<http://example.com/110/Tennis> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/10/Venus;Williams> <http://example.com/plays> <http://example.com/110/Tennis> .
<http://example.com/10/Venus;Williams> <http://example.com/lastName> "Williams" .
<http://example.com/10/Venus;Williams> <http://example.com/firstName> "Venus" .
<http://example.com/10/Venus;Williams> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/111/Football> <http://example.com/description> "Football" .
<http://example.com/111/Football> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/12/David;Villa> <http://example.com/plays> <http://example.com/111/Football> .
<http://example.com/12/David;Villa> <http://example.com/lastName> "Villa" .
<http://example.com/12/David;Villa> <http://example.com/firstName> "David" .
<http://example.com/12/David;Villa> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/112/Formula1> <http://example.com/description> "Formula1" .
<http://example.com/112/Formula1> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/11/Fernando;Alonso> <http://example.com/lastName> "Alonso" .
<http://example.com/11/Fernando;Alonso> <http://example.com/firstName> "Fernando" .
<http://example.com/11/Fernando;Alonso> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/111/Football> .
<http://example.com/11/Fernando;Alonso> <http://example.com/plays> <http://example.com/112/Formula1> .

2.204 RMLTC0011b-CSV

Title: M to M relation, by using an additional Triples Map

Description: Tests, M to M relations, by using an additional Triples Map

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV 
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/student/{ID}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:firstName; 
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:lastName; 
    rr:objectMap [
      rml:reference "LastName"
    ]
  ].

<TriplesMap2>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "sport.csv";
    rml:referenceFormulation ql:CSV 
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/sport/{ID}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:id; 
    rr:objectMap [
      rml:reference "ID"
    ]
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:description; 
    rr:objectMap [
      rml:reference "Description"
    ]
  ].

<LinkMap_1_2>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student_sport.csv";
    rml:referenceFormulation ql:CSV 
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/student/{ID_Student}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:plays; 
    rr:objectMap [
      rr:template "http://example.com/sport/{ID_Sport}"
    ]
  ].									

Error expected: No

Expected knowledge graph: (download)

<http://example.com/student/10> <http://example.com/lastName> "Williams" .
<http://example.com/student/10> <http://example.com/firstName> "Venus" .
<http://example.com/student/12> <http://example.com/lastName> "Villa" .
<http://example.com/student/12> <http://example.com/firstName> "David" .
<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
<http://example.com/sport/110> <http://example.com/description> "Tennis" .
<http://example.com/sport/110> <http://example.com/id> "110" .
<http://example.com/sport/111> <http://example.com/description> "Football" .
<http://example.com/sport/111> <http://example.com/id> "111" .
<http://example.com/sport/112> <http://example.com/description> "Formula1" .
<http://example.com/sport/112> <http://example.com/id> "112" .
<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .

2.205 RMLTC0011b-JSON

Title: M to M relation, by using an additional Triples Map

Description: Tests, M to M relations, by using an additional Triples Map

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]" 
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/student/{ID}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:firstName; 
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:lastName; 
    rr:objectMap [
      rml:reference "LastName"
    ]
  ].

<TriplesMap2>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "sport.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.sports[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/sport/{ID}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:id; 
    rr:objectMap [
      rml:reference "ID"
    ]
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:description; 
    rr:objectMap [
      rml:reference "Description"
    ]
  ].

<LinkMap_1_2>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student_sport.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.links[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/student/{ID_Student}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:plays; 
    rr:objectMap [
      rr:template "http://example.com/sport/{ID_Sport}"
    ]
  ].									

Error expected: No

Expected knowledge graph: (download)

<http://example.com/student/10> <http://example.com/lastName> "Williams" .
<http://example.com/student/10> <http://example.com/firstName> "Venus" .
<http://example.com/student/12> <http://example.com/lastName> "Villa" .
<http://example.com/student/12> <http://example.com/firstName> "David" .
<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
<http://example.com/sport/110> <http://example.com/description> "Tennis" .
<http://example.com/sport/110> <http://example.com/id> "110" .
<http://example.com/sport/111> <http://example.com/description> "Football" .
<http://example.com/sport/111> <http://example.com/id> "111" .
<http://example.com/sport/112> <http://example.com/description> "Formula1" .
<http://example.com/sport/112> <http://example.com/id> "112" .
<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .

2.206 RMLTC0011b-MySQL

Title: M to M relation, by using an additional Triples Map

Description: Tests, M to M relations, by using an additional Triples Map

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/student/{ID}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:firstName; 
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:lastName; 
    rr:objectMap [
      rml:reference "LastName"
    ]
  ].

<TriplesMap2>
  a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "sport";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/sport/{ID}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:id; 
    rr:objectMap [
      rml:reference "ID"
    ]
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:description; 
    rr:objectMap [
      rml:reference "Description"
    ]
  ].

<LinkMap_1_2>
  a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student_sport";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/student/{ID_Student}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:plays; 
    rr:objectMap [
      rr:template "http://example.com/sport/{ID_Sport}"
    ]
  ].									

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/student/10> <http://example.com/lastName> "Williams" .
<http://example.com/student/10> <http://example.com/firstName> "Venus" .
<http://example.com/student/12> <http://example.com/lastName> "Villa" .
<http://example.com/student/12> <http://example.com/firstName> "David" .
<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
<http://example.com/sport/110> <http://example.com/description> "Tennis" .
<http://example.com/sport/110> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/sport/111> <http://example.com/description> "Football" .
<http://example.com/sport/111> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/sport/112> <http://example.com/description> "Formula1" .
<http://example.com/sport/112> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .

2.207 RMLTC0011b-PostgreSQL

Title: M to M relation, by using an additional Triples Map

Description: Tests, M to M relations, by using an additional Triples Map

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/student/{ID}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:firstName; 
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:lastName; 
    rr:objectMap [
      rml:reference "LastName"
    ]
  ].

<TriplesMap2>
  a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "sport";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/sport/{ID}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:id; 
    rr:objectMap [
      rml:reference "ID"
    ]
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:description; 
    rr:objectMap [
      rml:reference "Description"
    ]
  ].

<LinkMap_1_2>
  a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student_sport";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/student/{ID_Student}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:plays; 
    rr:objectMap [
      rr:template "http://example.com/sport/{ID_Sport}"
    ]
  ].									

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/student/10> <http://example.com/lastName> "Williams" .
<http://example.com/student/10> <http://example.com/firstName> "Venus" .
<http://example.com/student/12> <http://example.com/lastName> "Villa" .
<http://example.com/student/12> <http://example.com/firstName> "David" .
<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
<http://example.com/sport/110> <http://example.com/description> "Tennis" .
<http://example.com/sport/110> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/sport/111> <http://example.com/description> "Football" .
<http://example.com/sport/111> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/sport/112> <http://example.com/description> "Formula1" .
<http://example.com/sport/112> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .

2.208 RMLTC0011b-SQLServer

Title: M to M relation, by using an additional Triples Map

Description: Tests, M to M relations, by using an additional Triples Map

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/student/{ID}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:firstName; 
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:lastName; 
    rr:objectMap [
      rml:reference "LastName"
    ]
  ].

<TriplesMap2>
  a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "sport";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/sport/{ID}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:id; 
    rr:objectMap [
      rml:reference "ID"
    ]
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:description; 
    rr:objectMap [
      rml:reference "Description"
    ]
  ].

<LinkMap_1_2>
  a rr:TriplesMap;
    
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "student_sport";
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/student/{ID_Student}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:plays; 
    rr:objectMap [
      rr:template "http://example.com/sport/{ID_Sport}"
    ]
  ].									

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/student/10> <http://example.com/lastName> "Williams" .
<http://example.com/student/10> <http://example.com/firstName> "Venus" .
<http://example.com/student/12> <http://example.com/lastName> "Villa" .
<http://example.com/student/12> <http://example.com/firstName> "David" .
<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
<http://example.com/sport/110> <http://example.com/description> "Tennis" .
<http://example.com/sport/110> <http://example.com/id> "110"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/sport/111> <http://example.com/description> "Football" .
<http://example.com/sport/111> <http://example.com/id> "111"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/sport/112> <http://example.com/description> "Formula1" .
<http://example.com/sport/112> <http://example.com/id> "112"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .

2.209 RMLTC0011b-XML

Title: M to M relation, by using an additional Triples Map

Description: Tests, M to M relations, by using an additional Triples Map

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/Students/Student" 
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/student/{ID}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:firstName; 
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:lastName; 
    rr:objectMap [
      rml:reference "LastName"
    ]
  ].

<TriplesMap2>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "sport.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/Sports/Sport"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/sport/{ID}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:id; 
    rr:objectMap [
      rml:reference "ID"
    ]
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:description; 
    rr:objectMap [
      rml:reference "Description"
    ]
  ].

<LinkMap_1_2>
  a rr:TriplesMap;
    
  rml:logicalSource [ 
    rml:source "student_sport.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/links/link"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/student/{ID_Student}";
  ]; 
	
  rr:predicateObjectMap [ 
    rr:predicate ex:plays; 
    rr:objectMap [
      rr:template "http://example.com/sport/{ID_Sport}"
    ]
  ].									

Error expected: No

Expected knowledge graph: (download)

<http://example.com/student/10> <http://example.com/lastName> "Williams" .
<http://example.com/student/10> <http://example.com/firstName> "Venus" .
<http://example.com/student/12> <http://example.com/lastName> "Villa" .
<http://example.com/student/12> <http://example.com/firstName> "David" .
<http://example.com/student/11> <http://example.com/lastName> "Alonso" .
<http://example.com/student/11> <http://example.com/firstName> "Fernando" .
<http://example.com/sport/110> <http://example.com/description> "Tennis" .
<http://example.com/sport/110> <http://example.com/id> "110" .
<http://example.com/sport/111> <http://example.com/description> "Football" .
<http://example.com/sport/111> <http://example.com/id> "111" .
<http://example.com/sport/112> <http://example.com/description> "Formula1" .
<http://example.com/sport/112> <http://example.com/id> "112" .
<http://example.com/student/10> <http://example.com/plays> <http://example.com/sport/110> .
<http://example.com/student/12> <http://example.com/plays> <http://example.com/sport/111> .
<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/112> .
<http://example.com/student/11> <http://example.com/plays> <http://example.com/sport/111> .

2.210 RMLTC0012a-CSV

Title: Duplicate tuples generate same blank node

Description: Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.csv";
    rml:referenceFormulation ql:CSV
  ];
	
  rr:subjectMap [ rr:template "{fname}{lname}{amount}"; rr:termType rr:BlankNode; ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
    
  rr:predicateObjectMap [ 
    rr:predicate ex:amount ; 
    rr:objectMap    [ 
      rml:reference "amount";
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

_:BobSmith30 <http://example.com/amount> "30" .
_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
_:SueJones20 <http://example.com/amount> "20" .
_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .

2.211 RMLTC0012a-JSON

Title: Duplicate tuples generate same blank node

Description: Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.persons[*]"
  ];
	
  rr:subjectMap [ rr:template "{fname}{lname}{amount}"; rr:termType rr:BlankNode; ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
    
  rr:predicateObjectMap [ 
    rr:predicate ex:amount ; 
    rr:objectMap    [ 
      rml:reference "amount";
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

_:BobSmith30 <http://example.com/amount> "30" .
_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
_:SueJones20 <http://example.com/amount> "20" .
_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .

2.212 RMLTC0012a-MySQL

Title: Duplicate tuples generate same blank node

Description: Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"IOUs\"";
  ];
	
  rr:subjectMap [ rr:template "{\"fname\"}_{\"lname\"}_{\"amount\"}"; rr:termType rr:BlankNode; ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
    
  rr:predicateObjectMap [ 
    rr:predicate ex:amount ; 
    rr:objectMap    [ 
      rml:reference "amount";
    ]
  ].


<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

_:BobSmith30 <http://example.com/amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
_:SueJones20 <http://example.com/amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .

2.213 RMLTC0012a-PostgreSQL

Title: Duplicate tuples generate same blank node

Description: Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"IOUs\"";
  ];
	
  rr:subjectMap [ rr:template "{\"fname\"}_{\"lname\"}_{\"amount\"}"; rr:termType rr:BlankNode; ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
    
  rr:predicateObjectMap [ 
    rr:predicate ex:amount ; 
    rr:objectMap    [ 
      rml:reference "amount";
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

_:BobSmith30 <http://example.com/amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
_:SueJones20 <http://example.com/amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .

2.214 RMLTC0012a-SQLServer

Title: Duplicate tuples generate same blank node

Description: Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"IOUs\"";
  ];
	
  rr:subjectMap [ rr:template "{\"fname\"}_{\"lname\"}_{\"amount\"}"; rr:termType rr:BlankNode; ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
    
  rr:predicateObjectMap [ 
    rr:predicate ex:amount ; 
    rr:objectMap    [ 
      rml:reference "amount";
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

_:BobSmith30 <http://example.com/amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
_:SueJones20 <http://example.com/amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .

2.215 RMLTC0012a-XML

Title: Duplicate tuples generate same blank node

Description: Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/Persons/Person"
  ];
	
  rr:subjectMap [ rr:template "{fname}{lname}{amount}"; rr:termType rr:BlankNode; ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
    
  rr:predicateObjectMap [ 
    rr:predicate ex:amount ; 
    rr:objectMap    [ 
      rml:reference "amount";
    ]
  ].

Error expected: No

Expected knowledge graph: (download)

_:BobSmith30 <http://example.com/amount> "30" .
_:BobSmith30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
_:SueJones20 <http://example.com/amount> "20" .
_:SueJones20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .

2.216 RMLTC0012b-CSV

Title: Duplicate tuples generate same blank node

Description: Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.csv";
    rml:referenceFormulation ql:CSV
  ];
	
  rr:subjectMap [
    rr:template "{fname}{lname}";
    rr:termType rr:BlankNode ;
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
  .

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "lives.csv";
    rml:referenceFormulation ql:CSV
];

  rr:subjectMap [
    rr:template "{fname}{lname}";
    rr:termType rr:BlankNode;
  ];

  rr:predicateObjectMap
  [
    rr:predicate	ex:city ;
    rr:objectMap    [
      rml:reference "city";
    ]
];
.

Error expected: No

Expected knowledge graph: (download)

_:BobSmith <http://example.com/city> "London" .
_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
_:SueJones <http://example.com/city> "Madrid" .
_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .

2.217 RMLTC0012b-JSON

Title: Duplicate tuples generate same blank node

Description: Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.persons[*]"
  ];

  rr:subjectMap [
    rr:template "{fname}{lname}";
    rr:termType rr:BlankNode ;
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name ;
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
  .

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "lives.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.lives[*]"
];

  rr:subjectMap [
    rr:template "{fname}{lname}";
    rr:termType rr:BlankNode;
  ];

  rr:predicateObjectMap
  [
    rr:predicate	ex:city ;
    rr:objectMap    [
      rml:reference "city";
    ]
];
.

Error expected: No

Expected knowledge graph: (download)

_:BobSmith <http://example.com/city> "London" .
_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
_:SueJones <http://example.com/city> "Madrid" .
_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .

2.218 RMLTC0012b-MySQL

Title: Duplicate tuples generate same blank node

Description: Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "persons";
  ];

  rr:subjectMap [
    rr:template "{fname}{lname}";
    rr:termType rr:BlankNode ;
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name ;
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
  .

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "lives";
  ];

  rr:subjectMap [
    rr:template "{fname}{lname}";
    rr:termType rr:BlankNode;
  ];

  rr:predicateObjectMap
  [
    rr:predicate	ex:city ;
    rr:objectMap    [
      rml:reference "city";
    ]
];
.

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

_:BobSmith <http://example.com/city> "London" .
_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
_:SueJones <http://example.com/city> "Madrid" .
_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .

2.219 RMLTC0012b-PostgreSQL

Title: Duplicate tuples generate same blank node

Description: Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "persons";
  ];
	
  rr:subjectMap [
    rr:template "{fname}{lname}";
    rr:termType rr:BlankNode ;
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
  .

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "lives";
  ];

  rr:subjectMap [
    rr:template "{fname}{lname}";
    rr:termType rr:BlankNode;
  ];

  rr:predicateObjectMap
  [
    rr:predicate	ex:city ;
    rr:objectMap    [
      rml:reference "city";
    ]
];
.

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "password" .

Error expected: No

Expected knowledge graph: (download)

_:BobSmith <http://example.com/city> "London" .
_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
_:SueJones <http://example.com/city> "Madrid" .
_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .

2.220 RMLTC0012b-SQLServer

Title: Duplicate tuples generate same blank node

Description: Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "persons";
  ];

  rr:subjectMap [
    rr:template "{fname}{lname}";
    rr:termType rr:BlankNode ;
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name ;
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
  .

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "lives";
  ];

  rr:subjectMap [
    rr:template "{fname}{lname}";
    rr:termType rr:BlankNode;
  ];

  rr:predicateObjectMap
  [
    rr:predicate	ex:city ;
    rr:objectMap    [
      rml:reference "city";
    ]
];
.

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

_:BobSmith <http://example.com/city> "London" .
_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
_:SueJones <http://example.com/city> "Madrid" .
_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .

2.221 RMLTC0012b-XML

Title: Duplicate tuples generate same blank node

Description: Tests that blank nodes with same identifier and in the same graph but generated by different logical rows are considered equivalent.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/Persons/Person"
  ];
	
  rr:subjectMap [
    rr:template "{fname}{lname}";
    rr:termType rr:BlankNode ;
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name ;
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
  .

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "lives.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/Lives/Live"
  ];

  rr:subjectMap [
    rr:template "{fname}{lname}";
    rr:termType rr:BlankNode;
  ];

  rr:predicateObjectMap
  [
    rr:predicate	ex:city ;
    rr:objectMap    [
      rml:reference "city";
    ]
];
.

Error expected: No

Expected knowledge graph: (download)

_:BobSmith <http://example.com/city> "London" .
_:BobSmith <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
_:SueJones <http://example.com/city> "Madrid" .
_:SueJones <http://xmlns.com/foaf/0.1/name> "Sue Jones" .

2.222 RMLTC0012c-CSV

Title: TriplesMap without subjectMap

Description: Tests a R2RML with missing information, TriplesMap without subjectMap.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.csv";
    rml:referenceFormulation ql:CSV
  ];
	
  rr:predicateObjectMap [
    rr:predicate foaf:name ; 
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
    
  rr:predicateObjectMap [ 
    rr:predicate ex:amount ; 
    rr:objectMap    [ 
      rml:reference "amount";
    ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.223 RMLTC0012c-JSON

Title: TriplesMap without subjectMap

Description: Tests a R2RML with missing information, TriplesMap without subjectMap.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.persons[*]"
  ];
	
  rr:predicateObjectMap [
    rr:predicate foaf:name ; 
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
    
  rr:predicateObjectMap [ 
    rr:predicate ex:amount ; 
    rr:objectMap    [ 
      rml:reference "amount";
    ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.224 RMLTC0012c-MySQL

Title: TriplesMap without subjectMap

Description: Tests a R2RML with missing information, TriplesMap without subjectMap.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"IOUs\"";
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name ;
    rr:objectMap [
      rr:template "{\"fname\"} {\"lname\"}";
      rr:termType rr:Literal ;
    ]
  ];

  rr:predicateObjectMap [
    rr:predicate ex:amount ;
    rr:objectMap    [
      rml:reference "\"amount\"";
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.225 RMLTC0012c-PostgreSQL

Title: TriplesMap without subjectMap

Description: Tests a R2RML with missing information, TriplesMap without subjectMap.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"IOUs\"";
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name ;
    rr:objectMap [
      rr:template "{\"fname\"} {\"lname\"}";
      rr:termType rr:Literal ;
    ]
  ];

  rr:predicateObjectMap [
    rr:predicate ex:amount ;
    rr:objectMap    [
      rml:reference "\"amount\"";
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "password" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.226 RMLTC0012c-SQLServer

Title: TriplesMap without subjectMap

Description: Tests a R2RML with missing information, TriplesMap without subjectMap.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"IOUs\"";
  ];

  rr:predicateObjectMap [
    rr:predicate foaf:name ;
    rr:objectMap [
      rr:template "{\"fname\"} {\"lname\"}";
      rr:termType rr:Literal ;
    ]
  ];

  rr:predicateObjectMap [
    rr:predicate ex:amount ;
    rr:objectMap    [
      rml:reference "\"amount\"";
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.227 RMLTC0012c-XML

Title: TriplesMap without subjectMap

Description: Tests a R2RML with missing information, TriplesMap without subjectMap.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.json";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/Persons/Person"
  ];
	
  rr:predicateObjectMap [
    rr:predicate foaf:name ; 
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
    
  rr:predicateObjectMap [ 
    rr:predicate ex:amount ; 
    rr:objectMap    [ 
      rml:reference "amount";
    ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.228 RMLTC0012d-CSV

Title: TriplesMap with two subjectMap

Description: Tests a R2RML with wrong information, TriplesMap with two subjectMap.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.csv";
    rml:referenceFormulation ql:CSV
  ];
	
  rr:subjectMap [ rr:template "{fname}_{lname}_{amount}"; rr:termType rr:BlankNode; ];

  rr:subjectMap [ rr:template "{amount}_{fname}_{lname}"; rr:termType rr:BlankNode; ];

  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
    
  rr:predicateObjectMap [ 
    rr:predicate ex:amount ; 
    rr:objectMap    [ 
      rml:reference "amount";
    ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.229 RMLTC0012d-JSON

Title: TriplesMap with two subjectMap

Description: Tests a R2RML with wrong information, TriplesMap with two subjectMap.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.persons[*]"
  ];
	
  rr:subjectMap [ rr:template "{fname}_{lname}_{amount}"; rr:termType rr:BlankNode; ];

  rr:subjectMap [ rr:template "{amount}_{fname}_{lname}"; rr:termType rr:BlankNode; ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
    
  rr:predicateObjectMap [ 
    rr:predicate ex:amount ; 
    rr:objectMap    [ 
      rml:reference "amount";
    ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.230 RMLTC0012d-MySQL

Title: TriplesMap with two subjectMap

Description: Tests a R2RML with wrong information, TriplesMap with two subjectMap.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"IOUs\"";
  ];

  rr:subjectMap [
    rr:template "{\"fname\"}_{\"lname\"}_{\"amount\"}";
  ];

  rr:subjectMap [
    rr:template "{\"amount\"}_{\"fname\"}_{\"lname\"}";
  ];

  rr:predicateObjectMap [
    rr:predicate ex:amount ;
    rr:objectMap [ rml:reference "\"amount\""; ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.231 RMLTC0012d-PostgreSQL

Title: TriplesMap with two subjectMap

Description: Tests a R2RML with wrong information, TriplesMap with two subjectMap.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"IOUs\"";
  ];

  rr:subjectMap [
    rr:template "{\"fname\"}_{\"lname\"}_{\"amount\"}";
  ];

  rr:subjectMap [
    rr:template "{\"amount\"}_{\"fname\"}_{\"lname\"}";
  ];

  rr:predicateObjectMap [
    rr:predicate ex:amount ;
    rr:objectMap [ rml:reference "\"amount\""; ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "password" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.232 RMLTC0012d-SQLServer

Title: TriplesMap with two subjectMap

Description: Tests a R2RML with wrong information, TriplesMap with two subjectMap.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"IOUs\"";
  ];

  rr:subjectMap [
    rr:template "{\"fname\"}_{\"lname\"}_{\"amount\"}";
  ];

  rr:subjectMap [
    rr:template "{\"amount\"}_{\"fname\"}_{\"lname\"}";
  ];

  rr:predicateObjectMap [
    rr:predicate ex:amount ;
    rr:objectMap [ rml:reference "\"amount\""; ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.233 RMLTC0012d-XML

Title: TriplesMap with two subjectMap

Description: Tests a R2RML with wrong information, TriplesMap with two subjectMap.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.json";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/Persons/Person"
  ];
	
  rr:subjectMap [ rr:template "{fname}_{lname}_{amount}"; rr:termType rr:BlankNode; ];

  rr:subjectMap [ rr:template "{amount}_{fname}_{lname}"; rr:termType rr:BlankNode; ];
	
  rr:predicateObjectMap [ 
    rr:predicate foaf:name ; 
    rr:objectMap [
      rr:template "{fname} {lname}";
      rr:termType rr:Literal ;
    ]
  ];
    
  rr:predicateObjectMap [ 
    rr:predicate ex:amount ; 
    rr:objectMap    [ 
      rml:reference "amount";
    ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.234 RMLTC0012e-MySQL

Title: Default mapping

Description: Tests the generation of a default mapping for tables without a primary key.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008; rr:tableName  "\"IOUs\"" ];
	
    rr:subjectMap [ rr:template "{\"fname\"}_{\"lname\"}_{\"amount\"}"; rr:termType rr:BlankNode; ];
    
    rr:predicateObjectMap [
    	rr:predicate rdf:type;
    	rr:object <IOUs>;
    ];
		
    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#fname> ; 
      rr:objectMap		[ rml:reference "\"fname\""; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#lname> ; 
      rr:objectMap		[ rml:reference "\"lname\""; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#amount> ; 
      rr:objectMap		[ rml:reference "\"amount\""; ]
    ];
	.
	
<TriplesMap2>
    a rr:TriplesMap;

	rml:logicalSource [ rr:tableName  "\"Lives\"" ];
	
    rr:subjectMap [ rr:template "{\"fname\"}_{\"lname\"}_{\"city\"}"; rr:termType rr:BlankNode; ];
    
    rr:predicateObjectMap [
    	rr:predicate rdf:type;
    	rr:object <Lives>;
    ];
	
    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#fname> ; 
      rr:objectMap		[ rml:reference "\"fname\""; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#lname> ; 
      rr:objectMap		[ rml:reference "\"lname\""; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#city> ; 
      rr:objectMap		[ rml:reference "\"city\""; ]
    ];
	.	

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

_:BobSmith30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:BobSmith30 <http://example.com/base/IOUs#fname> "Bob" .
_:BobSmith30 <http://example.com/base/IOUs#lname> "Smith" .
_:BobSmith30 <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:SueJones20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:SueJones20 <http://example.com/base/IOUs#fname> "Sue" .
_:SueJones20 <http://example.com/base/IOUs#lname> "Jones" .
_:SueJones20 <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:BobSmithLondon <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
_:BobSmithLondon <http://example.com/base/IOUs#fname> "Bob" .
_:BobSmithLondon <http://example.com/base/IOUs#lname> "Smith" .
_:BobSmithLondon <http://example.com/base/IOUs#city> "London" .
_:SueJonesMadrid <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
_:SueJonesMadrid <http://example.com/base/IOUs#fname> "Sue" .
_:SueJonesMadrid <http://example.com/base/IOUs#lname> "Jones" .
_:SueJonesMadrid <http://example.com/base/IOUs#city> "Madrid" .


2.235 RMLTC0012e-PostgreSQL

Title: Default mapping

Description: Tests the generation of a default mapping for tables without a primary key.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008; rr:tableName  "\"IOUs\"" ];
	
    rr:subjectMap [ rr:template "{\"fname\"}_{\"lname\"}_{\"amount\"}"; rr:termType rr:BlankNode; ];
    
    rr:predicateObjectMap [
    	rr:predicate rdf:type;
    	rr:object <IOUs>;
    ];
		
    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#fname> ; 
      rr:objectMap		[ rml:reference "\"fname\""; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#lname> ; 
      rr:objectMap		[ rml:reference "\"lname\""; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#amount> ; 
      rr:objectMap		[ rml:reference "\"amount\""; ]
    ];
	.
	
<TriplesMap2>
    a rr:TriplesMap;

	rml:logicalSource [ rr:tableName  "\"Lives\"" ];
	
    rr:subjectMap [ rr:template "{\"fname\"}_{\"lname\"}_{\"city\"}"; rr:termType rr:BlankNode; ];
    
    rr:predicateObjectMap [
    	rr:predicate rdf:type;
    	rr:object <Lives>;
    ];
	
    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#fname> ; 
      rr:objectMap		[ rml:reference "\"fname\""; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#lname> ; 
      rr:objectMap		[ rml:reference "\"lname\""; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#city> ; 
      rr:objectMap		[ rml:reference "\"city\""; ]
    ];
	.	

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

_:BobSmith30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:BobSmith30 <http://example.com/base/IOUs#fname> "Bob" .
_:BobSmith30 <http://example.com/base/IOUs#lname> "Smith" .
_:BobSmith30 <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:SueJones20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:SueJones20 <http://example.com/base/IOUs#fname> "Sue" .
_:SueJones20 <http://example.com/base/IOUs#lname> "Jones" .
_:SueJones20 <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:BobSmithLondon <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
_:BobSmithLondon <http://example.com/base/IOUs#fname> "Bob" .
_:BobSmithLondon <http://example.com/base/IOUs#lname> "Smith" .
_:BobSmithLondon <http://example.com/base/IOUs#city> "London" .
_:SueJonesMadrid <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
_:SueJonesMadrid <http://example.com/base/IOUs#fname> "Sue" .
_:SueJonesMadrid <http://example.com/base/IOUs#lname> "Jones" .
_:SueJonesMadrid <http://example.com/base/IOUs#city> "Madrid" .


2.236 RMLTC0012e-SQLServer

Title: Default mapping

Description: Tests the generation of a default mapping for tables without a primary key.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008; rr:tableName  "\"IOUs\"" ];
	
    rr:subjectMap [ rr:template "{\"fname\"}_{\"lname\"}_{\"amount\"}"; rr:termType rr:BlankNode; ];
    
    rr:predicateObjectMap [
    	rr:predicate rdf:type;
    	rr:object <IOUs>;
    ];
		
    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#fname> ; 
      rr:objectMap		[ rml:reference "\"fname\""; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#lname> ; 
      rr:objectMap		[ rml:reference "\"lname\""; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#amount> ; 
      rr:objectMap		[ rml:reference "\"amount\""; ]
    ];
	.
	
<TriplesMap2>
    a rr:TriplesMap;

	rml:logicalSource [ rr:tableName  "\"Lives\"" ];
	
    rr:subjectMap [ rr:template "{\"fname\"}_{\"lname\"}_{\"city\"}"; rr:termType rr:BlankNode; ];
    
    rr:predicateObjectMap [
    	rr:predicate rdf:type;
    	rr:object <Lives>;
    ];
	
    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#fname> ; 
      rr:objectMap		[ rml:reference "\"fname\""; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#lname> ; 
      rr:objectMap		[ rml:reference "\"lname\""; ]
    ];

    rr:predicateObjectMap
    [ 
      rr:predicate		<IOUs#city> ; 
      rr:objectMap		[ rml:reference "\"city\""; ]
    ];
	.	

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";

  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

_:BobSmith30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:BobSmith30 <http://example.com/base/IOUs#fname> "Bob" .
_:BobSmith30 <http://example.com/base/IOUs#lname> "Smith" .
_:BobSmith30 <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:SueJones20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:SueJones20 <http://example.com/base/IOUs#fname> "Sue" .
_:SueJones20 <http://example.com/base/IOUs#lname> "Jones" .
_:SueJones20 <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:BobSmithLondon <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
_:BobSmithLondon <http://example.com/base/IOUs#fname> "Bob" .
_:BobSmithLondon <http://example.com/base/IOUs#lname> "Smith" .
_:BobSmithLondon <http://example.com/base/IOUs#city> "London" .
_:SueJonesMadrid <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
_:SueJonesMadrid <http://example.com/base/IOUs#fname> "Sue" .
_:SueJonesMadrid <http://example.com/base/IOUs#lname> "Jones" .
_:SueJonesMadrid <http://example.com/base/IOUs#city> "Madrid" .


2.237 RMLTC0013a-JSON

Title: Null value in JSON file

Description: Tests if null values in JSON files are handled correctly.

RML rules (download):

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

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.persons[*]"
  ];
	
  rr:subjectMap [ rr:template "http://example.com/Person/{ID}/{Name}/{DateOfBirth}"];
	
  rr:predicateObjectMap
    [ 
      rr:predicate		ex:BirthDay ;
      rr:objectMap		[ rml:reference "DateOfBirth" ]
    ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .

2.238 RMLTC0013a-MySQL

Title: Generation of empty triples from referenced columns that have null values

Description: Tests the generation of empty triples from referenced columns that have null values

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "Person";
  ];
	
  rr:subjectMap [
    rr:template "http://example.com/Person/{\"ID\"}/{\"Name\"}/{\"DateOfBirth\"}"
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:BirthDay ; 
    rr:objectMap [
      rr:refrence "\"DateOfBirth\"";
    ]
  ];
  .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver"; # this is ignored
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .


2.239 RMLTC0013a-PostgreSQL

Title: Generation of empty triples from referenced columns that have null values

Description: Tests the generation of empty triples from referenced columns that have null values

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "Person";
  ];
	
  rr:subjectMap [
    rr:template "http://example.com/Person/{\"ID\"}/{\"Name\"}/{\"DateOfBirth\"}"
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:BirthDay ; 
    rr:objectMap [
      rr:refrence "\"DateOfBirth\"";
    ]
  ];
  .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "password" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .


2.240 RMLTC0013a-SQLServer

Title: Generation of empty triples from referenced columns that have null values

Description: Tests the generation of empty triples from referenced columns that have null values

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "Person";
  ];
	
  rr:subjectMap [
    rr:template "http://example.com/Person/{\"ID\"}/{\"Name\"}/{\"DateOfBirth\"}"
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate ex:BirthDay ; 
    rr:objectMap [
      rr:refrence "\"DateOfBirth\"";
    ]
  ];
  .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN"; # the "jbdc:mysql:// part is ignored
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Person/2/Bob/September%2C%202010> <http://example.com/BirthDay> "September, 2010" .


2.241 RMLTC0014d-MySQL

Title: three tables, one primary key, one foreign key

Description: Test the translation of database type codes to IRIs

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008; 
    rml:query  """

        SELECT "EMP".*, (CASE "job"
            WHEN 'CLERK' THEN 'general-office'
            WHEN 'NIGHTGUARD' THEN 'security'
            WHEN 'ENGINEER' THEN 'engineering'
        END) AS ROLE FROM "EMP"

        """
   ];
	
    rr:subjectMap [ rr:template "http://data.example.com/employee/{\"empno\"}" ];
    
    rr:predicateObjectMap [
        rr:predicate ex:role;
        rr:objectMap [ rr:template "http://data.example.com/roles/{ROLE}" ];
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://data.example.com/employee/7369> <http://example.com/ns#role> <http://data.example.com/roles/general-office> .

2.242 RMLTC0014d-PostgreSQL

Title: three tables, one primary key, one foreign key

Description: Test the translation of database type codes to IRIs

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008; 
    rml:query  """

        SELECT "EMP".*, (CASE "job"
            WHEN 'CLERK' THEN 'general-office'
            WHEN 'NIGHTGUARD' THEN 'security'
            WHEN 'ENGINEER' THEN 'engineering'
        END) AS ROLE FROM "EMP"

        """
   ];
	
    rr:subjectMap [ rr:template "http://data.example.com/employee/{\"empno\"}" ];
    
    rr:predicateObjectMap [
        rr:predicate ex:role;
        rr:objectMap [ rr:template "http://data.example.com/roles/{ROLE}" ];
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://data.example.com/employee/7369> <http://example.com/ns#role> <http://data.example.com/roles/general-office> .

2.243 RMLTC0014d-SQLServer

Title: three tables, one primary key, one foreign key

Description: Test the translation of database type codes to IRIs

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query  """

        SELECT "EMP".*, (CASE "job"
            WHEN 'CLERK' THEN 'general-office'
            WHEN 'NIGHTGUARD' THEN 'security'
            WHEN 'ENGINEER' THEN 'engineering'
        END) AS ROLE FROM "EMP"

        """
   ];

    rr:subjectMap [ rr:template "http://data.example.com/employee/{\"empno\"}" ];

    rr:predicateObjectMap [
        rr:predicate ex:role;
        rr:objectMap [ rr:template "http://data.example.com/roles/{ROLE}" ];
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://data.example.com/employee/7369> <http://example.com/ns#role> <http://data.example.com/roles/general-office> .

2.244 RMLTC0015a-CSV

Title: Generation of language tags from a table with language information

Description: Generation of language tags from a table with language information

RML rules (download):

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

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "country_en.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Code}"
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "Name";
      rr:language "en"
    ] 
  ].

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "country_es.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Code}"
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "Name";
      rr:language "es"
    ] 
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .


2.245 RMLTC0015a-JSON

Title: Generation of language tags from a table with language information

Description: Generation of language tags from a table with language information

RML rules (download):

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

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "country_en.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.countries[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Code}"
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "Name";
      rr:language "en"
    ] 
  ].

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "country_es.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.countries[*]"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Code}"
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "Name";
      rr:language "es"
    ] 
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .


2.246 RMLTC0015a-MySQL

Title: Generation of language tags from a table with language information

Description: Generation of language tags from a table with language information

RML rules (download):

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

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query """
        SELECT "Code", "Name", "Lan"
        FROM "Country"
        WHERE "Lan" = 'EN';
       """
  ];

  rr:subjectMap [
    rr:template "http://example.com/{\"Code\"}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "\"Name\"";
      rr:language "en"
    ]
  ].

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
        rml:query """
            SELECT "Code", "Name", "Lan"
            FROM "Country"
            WHERE "Lan" = 'ES';
           """
  ];

  rr:subjectMap [
    rr:template "http://example.com/{\"Code\"}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "\"Name\"";
      rr:language "es"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .


2.247 RMLTC0015a-PostgreSQL

Title: Generation of language tags from a table with language information

Description: Generation of language tags from a table with language information

RML rules (download):

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

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query """
        SELECT "Code", "Name", "Lan"
        FROM "Country"
        WHERE "Lan" = 'EN';
       """
  ];

  rr:subjectMap [
    rr:template "http://example.com/{\"Code\"}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "\"Name\"";
      rr:language "en"
    ]
  ].

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
        rml:query """
            SELECT "Code", "Name", "Lan"
            FROM "Country"
            WHERE "Lan" = 'ES';
           """
  ];

  rr:subjectMap [
    rr:template "http://example.com/{\"Code\"}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "\"Name\"";
      rr:language "es"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .


2.248 RMLTC0015a-SQLServer

Title: Generation of language tags from a table with language information

Description: Generation of language tags from a table with language information

RML rules (download):

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

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query """
        SELECT "Code", "Name", "Lan"
        FROM "Country"
        WHERE "Lan" = 'EN';
       """
  ];

  rr:subjectMap [
    rr:template "http://example.com/{\"Code\"}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "\"Name\"";
      rr:language "en"
    ]
  ].

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
        rml:query """
            SELECT "Code", "Name", "Lan"
            FROM "Country"
            WHERE "Lan" = 'ES';
           """
  ];

  rr:subjectMap [
    rr:template "http://example.com/{\"Code\"}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "\"Name\"";
      rr:language "es"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .


2.249 RMLTC0015a-XML

Title: Generation of language tags from a table with language information

Description: Generation of language tags from a table with language information

RML rules (download):

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

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "country_en.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/countries/country"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Code}"
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "Name";
      rr:language "en"
    ] 
  ].

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [ 
    rml:source "country_es.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/countries/country"
  ];

  rr:subjectMap [ 
    rr:template "http://example.com/{Code}"
  ];
	
  rr:predicateObjectMap [ 
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "Name";
      rr:language "es"
    ] 
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Bolivia, Plurinational State of"@en .
<http://example.com/BO> <http://www.w3.org/2000/01/rdf-schema#label> "Estado Plurinacional de Bolivia"@es .
<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Ireland"@en .
<http://example.com/IE> <http://www.w3.org/2000/01/rdf-schema#label> "Irlanda"@es .


2.250 RMLTC0015b-CSV

Title: Generation of language tags from a table with language information, and a term map with invalid rr:language value

Description: Tests a term map with an invalid rr:language value, which is an error

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "country_en.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/{Code}" ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label;
    rr:objectMap [
      rml:reference "Name";
      rr:language "english"
    ]
  ] .

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "country_es.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rr:template "http://example.com/{Code}" ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label;
    rr:objectMap [
      rml:reference "Name";
      rr:language "spanish"
    ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.251 RMLTC0015b-JSON

Title: Generation of language tags from a table with language information, and a term map with invalid rr:language value

Description: Tests a term map with an invalid rr:language value, which is an error

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "country_en.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.countries[*]"
  ];

  rr:subjectMap [ rr:template "http://example.com/{Code}" ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label;
    rr:objectMap [
      rml:reference "Name";
      rr:language "english"
    ]
  ] .

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "country_en.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.countries[*]"
  ];

  rr:subjectMap [ rr:template "http://example.com/{Code}" ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label;
    rr:objectMap [
      rml:reference "Name";
      rr:language "spanish"
    ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.252 RMLTC0015b-MySQL

Title: Generation of language tags from a table with language information, and a term map with invalid rr:language value

Description: Tests a term map with an invalid rr:language value, which is an error

RML rules (download):

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

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query """
        SELECT "Code", "Name", "Lan"
        FROM "Country"
        WHERE "Lan" = 'EN';
       """
  ];

  rr:subjectMap [
    rr:template "http://example.com/{\"Code\"}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "\"Name\"";
      rr:language "english"
    ]
  ].

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [
    rr:sqlVersion rr:SQL2008;
        rml:query """
            SELECT "Code", "Name", "Lan"
            FROM "Country"
            WHERE "Lan" = 'ES';
           """
  ];

  rr:subjectMap [
    rr:template "http://example.com/{\"Code\"}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "\"Name\"";
      rr:language "spanish"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.253 RMLTC0015b-PostgreSQL

Title: Generation of language tags from a table with language information, and a term map with invalid rr:language value

Description: Tests a term map with an invalid rr:language value, which is an error

RML rules (download):

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

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query """
        SELECT "Code", "Name", "Lan"
        FROM "Country"
        WHERE "Lan" = 'EN';
       """
  ];

  rr:subjectMap [
    rr:template "http://example.com/{\"Code\"}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "\"Name\"";
      rr:language "english"
    ]
  ].

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
        rml:query """
            SELECT "Code", "Name", "Lan"
            FROM "Country"
            WHERE "Lan" = 'ES';
           """
  ];

  rr:subjectMap [
    rr:template "http://example.com/{\"Code\"}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "\"Name\"";
      rr:language "spanish"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.254 RMLTC0015b-SQLServer

Title: Generation of language tags from a table with language information, and a term map with invalid rr:language value

Description: Tests a term map with an invalid rr:language value, which is an error

RML rules (download):

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

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query """
        SELECT "Code", "Name", "Lan"
        FROM "Country"
        WHERE "Lan" = 'EN';
       """
  ];

  rr:subjectMap [
    rr:template "http://example.com/{\"Code\"}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "\"Name\"";
      rr:language "english"
    ]
  ].

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
        rml:query """
            SELECT "Code", "Name", "Lan"
            FROM "Country"
            WHERE "Lan" = 'ES';
           """
  ];

  rr:subjectMap [
    rr:template "http://example.com/{\"Code\"}"
  ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label ;
    rr:objectMap [
      rml:reference "\"Name\"";
      rr:language "spanish"
    ]
  ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.255 RMLTC0015b-XML

Title: Generation of language tags from a table with language information, and a term map with invalid rr:language value

Description: Tests a term map with an invalid rr:language value, which is an error

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "country_en.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/countries/country"
  ];

  rr:subjectMap [ rr:template "http://example.com/{Code}" ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label;
    rr:objectMap [
      rml:reference "Name";
      rr:language "english"
    ]
  ] .

<TriplesMap2>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "country_es.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/countries/country"
  ];

  rr:subjectMap [ rr:template "http://example.com/{Code}" ];

  rr:predicateObjectMap [
    rr:predicate rdfs:label;
    rr:objectMap [
      rml:reference "Name";
      rr:language "spanish"
    ]
  ].

Error expected: Yes

Expected knowledge graph: None, because an error is expected that stops the generation.

2.256 RMLTC0016a-MySQL

Title: Table with datatypes: string and integer

Description: Tests the rr:termtype and datatype conversions: string and integer

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Patient\"" ];

    rr:subjectMap [ rr:template "http://example.com/Patient/{\"ID\"}"; ];

    rr:predicateObjectMap
    [
		rr:predicate	rdf:type;
		rr:object		foaf:Person;
	];

    rr:predicateObjectMap
    [
		rr:predicate	ex:id ;
		rr:objectMap    [ rml:reference "\"ID\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		ex:firstName;
      rr:objectMap		[ rml:reference "\"FirstName\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		ex:lastName;
      rr:objectMap		[ rml:reference "\"LastName\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		ex:gender;
      rr:objectMap		[ rml:reference "\"Sex\""; ]
    ];

    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Patient/10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient/10> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/Patient/10> <http://example.com/firstName> "Monica" .
<http://example.com/Patient/10> <http://example.com/lastName> "Geller" .
<http://example.com/Patient/10> <http://example.com/gender> "female" .
<http://example.com/Patient/11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient/11> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/Patient/11> <http://example.com/firstName> "Rachel" .
<http://example.com/Patient/11> <http://example.com/lastName> "Green" .
<http://example.com/Patient/11> <http://example.com/gender> "female" .
<http://example.com/Patient/12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient/12> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/Patient/12> <http://example.com/firstName> "Chandler" .
<http://example.com/Patient/12> <http://example.com/lastName> "Bing" .
<http://example.com/Patient/12> <http://example.com/gender> "male" .

2.257 RMLTC0016a-PostgreSQL

Title: Table with datatypes: string and integer

Description: Tests the rr:termtype and datatype conversions: string and integer

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Patient\"" ];

    rr:subjectMap [ rr:template "http://example.com/Patient/{\"ID\"}"; ];

    rr:predicateObjectMap
    [
		rr:predicate	rdf:type;
		rr:object		foaf:Person;
	];

    rr:predicateObjectMap
    [
		rr:predicate	ex:id ;
		rr:objectMap    [ rml:reference "\"ID\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		ex:firstName;
      rr:objectMap		[ rml:reference "\"FirstName\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		ex:lastName;
      rr:objectMap		[ rml:reference "\"LastName\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		ex:gender;
      rr:objectMap		[ rml:reference "\"Sex\""; ]
    ];

    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Patient/10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient/10> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/Patient/10> <http://example.com/firstName> "Monica" .
<http://example.com/Patient/10> <http://example.com/lastName> "Geller" .
<http://example.com/Patient/10> <http://example.com/gender> "female" .
<http://example.com/Patient/11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient/11> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/Patient/11> <http://example.com/firstName> "Rachel" .
<http://example.com/Patient/11> <http://example.com/lastName> "Green" .
<http://example.com/Patient/11> <http://example.com/gender> "female" .
<http://example.com/Patient/12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient/12> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/Patient/12> <http://example.com/firstName> "Chandler" .
<http://example.com/Patient/12> <http://example.com/lastName> "Bing" .
<http://example.com/Patient/12> <http://example.com/gender> "male" .

2.258 RMLTC0016a-SQLServer

Title: Table with datatypes: string and integer

Description: Tests the rr:termtype and datatype conversions: string and integer

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Patient\"" ];

    rr:subjectMap [ rr:template "http://example.com/Patient/{\"ID\"}"; ];

    rr:predicateObjectMap
    [
		rr:predicate	rdf:type;
		rr:object		foaf:Person;
	];

    rr:predicateObjectMap
    [
		rr:predicate	ex:id ;
		rr:objectMap    [ rml:reference "\"ID\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		ex:firstName;
      rr:objectMap		[ rml:reference "\"FirstName\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		ex:lastName;
      rr:objectMap		[ rml:reference "\"LastName\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		ex:gender;
      rr:objectMap		[ rml:reference "\"Sex\""; ]
    ];

    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Patient/10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient/10> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/Patient/10> <http://example.com/firstName> "Monica" .
<http://example.com/Patient/10> <http://example.com/lastName> "Geller" .
<http://example.com/Patient/10> <http://example.com/gender> "female" .
<http://example.com/Patient/11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient/11> <http://example.com/id> "11"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/Patient/11> <http://example.com/firstName> "Rachel" .
<http://example.com/Patient/11> <http://example.com/lastName> "Green" .
<http://example.com/Patient/11> <http://example.com/gender> "female" .
<http://example.com/Patient/12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient/12> <http://example.com/id> "12"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/Patient/12> <http://example.com/firstName> "Chandler" .
<http://example.com/Patient/12> <http://example.com/lastName> "Bing" .
<http://example.com/Patient/12> <http://example.com/gender> "male" .

2.259 RMLTC0016b-MySQL

Title: Table with datatypes: real and float

Description: Tests the rr:termtype and datatype conversions: real and float

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Patient\"" ];

    rr:subjectMap [ rr:template "http://example.com/Patient/{\"ID\"}"; ];

    rr:predicateObjectMap
    [
		rr:predicate	rdf:type;
		rr:object		foaf:Person;
	];

    rr:predicateObjectMap
    [
      rr:predicate ex:weight;
      rr:objectMap    [ rml:reference "\"Weight\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate ex:height;
      rr:objectMap    [ rml:reference "\"Height\""; ]
    ];
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient10> <http://example.com/weight> "8.025E1"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Patient10> <http://example.com/height> "1.65E0"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient11> <http://example.com/weight> "7.022E1"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Patient11> <http://example.com/height> "1.7E0"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient12> <http://example.com/weight> "9.031E1"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Patient12> <http://example.com/height> "1.76E0"^^<http://www.w3.org/2001/XMLSchema#double> .

2.260 RMLTC0016b-PostgreSQL

Title: Table with datatypes: real and float

Description: Tests the rr:termtype and datatype conversions: real and float

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Patient\"" ];

    rr:subjectMap [ rr:template "http://example.com/Patient/{\"ID\"}"; ];

    rr:predicateObjectMap
    [
		rr:predicate	rdf:type;
		rr:object		foaf:Person;
	];

    rr:predicateObjectMap
    [
      rr:predicate ex:weight;
      rr:objectMap    [ rml:reference "\"Weight\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate ex:height;
      rr:objectMap    [ rml:reference "\"Height\""; ]
    ];
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient10> <http://example.com/weight> "8.025E1"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Patient10> <http://example.com/height> "1.65E0"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient11> <http://example.com/weight> "7.022E1"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Patient11> <http://example.com/height> "1.7E0"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient12> <http://example.com/weight> "9.031E1"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Patient12> <http://example.com/height> "1.76E0"^^<http://www.w3.org/2001/XMLSchema#double> .

2.261 RMLTC0016b-SQLServer

Title: Table with datatypes: real and float

Description: Tests the rr:termtype and datatype conversions: real and float

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Patient\"" ];

    rr:subjectMap [ rr:template "http://example.com/Patient/{\"ID\"}"; ];

    rr:predicateObjectMap
    [
		rr:predicate	rdf:type;
		rr:object		foaf:Person;
	];

    rr:predicateObjectMap
    [
      rr:predicate ex:weight;
      rr:objectMap    [ rml:reference "\"Weight\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate ex:height;
      rr:objectMap    [ rml:reference "\"Height\""; ]
    ];
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient10> <http://example.com/weight> "8.025E1"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Patient10> <http://example.com/height> "1.65E0"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient11> <http://example.com/weight> "7.022E1"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Patient11> <http://example.com/height> "1.7E0"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient12> <http://example.com/weight> "9.031E1"^^<http://www.w3.org/2001/XMLSchema#double> .
<http://example.com/Patient12> <http://example.com/height> "1.76E0"^^<http://www.w3.org/2001/XMLSchema#double> .

2.262 RMLTC0016c-MySQL

Title: Table with datatypes: date and timestamp

Description: Tests the rr:termtype and datatype conversions: date and timestamp

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Patient\"" ];

    rr:subjectMap [ rr:template "http://example.com/Patient/{\"ID\"}"; ];

    rr:predicateObjectMap
    [
		rr:predicate	rdf:type;
		rr:object		foaf:Person;
	];

    rr:predicateObjectMap
    [
      rr:predicate		ex:birthdate;
      rr:objectMap		[ rml:reference "\"BirthDate\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		ex:entrancedate;
      rr:objectMap		[ rml:reference "\"EntranceDate\""; ]
    ];
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient10> <http://example.com/birthdate> "1981-10-10"^^<http://www.w3.org/2001/XMLSchema#date> .
<http://example.com/Patient10> <http://example.com/entrancedate> "2009-10-10T12:12:22"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient11> <http://example.com/birthdate> "1982-11-12"^^<http://www.w3.org/2001/XMLSchema#date> .
<http://example.com/Patient11> <http://example.com/entrancedate> "2008-11-12T09:45:44"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient12> <http://example.com/birthdate> "1978-04-06"^^<http://www.w3.org/2001/XMLSchema#date> .
<http://example.com/Patient12> <http://example.com/entrancedate> "2007-03-12T02:13:14"^^<http://www.w3.org/2001/XMLSchema#dateTime> .

2.263 RMLTC0016c-PostgreSQL

Title: Table with datatypes: date and timestamp

Description: Tests the rr:termtype and datatype conversions: date and timestamp

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Patient\"" ];

    rr:subjectMap [ rr:template "http://example.com/Patient/{\"ID\"}"; ];

    rr:predicateObjectMap
    [
		rr:predicate	rdf:type;
		rr:object		foaf:Person;
	];

    rr:predicateObjectMap
    [
      rr:predicate		ex:birthdate;
      rr:objectMap		[ rml:reference "\"BirthDate\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		ex:entrancedate;
      rr:objectMap		[ rml:reference "\"EntranceDate\""; ]
    ];
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient10> <http://example.com/birthdate> "1981-10-10"^^<http://www.w3.org/2001/XMLSchema#date> .
<http://example.com/Patient10> <http://example.com/entrancedate> "2009-10-10T12:12:22"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient11> <http://example.com/birthdate> "1982-11-12"^^<http://www.w3.org/2001/XMLSchema#date> .
<http://example.com/Patient11> <http://example.com/entrancedate> "2008-11-12T09:45:44"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient12> <http://example.com/birthdate> "1978-04-06"^^<http://www.w3.org/2001/XMLSchema#date> .
<http://example.com/Patient12> <http://example.com/entrancedate> "2007-03-12T02:13:14"^^<http://www.w3.org/2001/XMLSchema#dateTime> .

2.264 RMLTC0016c-SQLServer

Title: Table with datatypes: date and timestamp

Description: Tests the rr:termtype and datatype conversions: date and timestamp

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Patient\"" ];

    rr:subjectMap [ rr:template "http://example.com/Patient/{\"ID\"}"; ];

    rr:predicateObjectMap
    [
		rr:predicate	rdf:type;
		rr:object		foaf:Person;
	];

    rr:predicateObjectMap
    [
      rr:predicate		ex:birthdate;
      rr:objectMap		[ rml:reference "\"BirthDate\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		ex:entrancedate;
      rr:objectMap		[ rml:reference "\"EntranceDate\""; ]
    ];
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient10> <http://example.com/birthdate> "1981-10-10"^^<http://www.w3.org/2001/XMLSchema#date> .
<http://example.com/Patient10> <http://example.com/entrancedate> "2009-10-10T12:12:22"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient11> <http://example.com/birthdate> "1982-11-12"^^<http://www.w3.org/2001/XMLSchema#date> .
<http://example.com/Patient11> <http://example.com/entrancedate> "2008-11-12T09:45:44"^^<http://www.w3.org/2001/XMLSchema#dateTime> .
<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient12> <http://example.com/birthdate> "1978-04-06"^^<http://www.w3.org/2001/XMLSchema#date> .
<http://example.com/Patient12> <http://example.com/entrancedate> "2007-03-12T02:13:14"^^<http://www.w3.org/2001/XMLSchema#dateTime> .

2.265 RMLTC0016d-MySQL

Title: Table with datatypes, boolean conversions

Description: Tests the rr:termtype and datatype conversions: boolean

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Patient\"" ];

    rr:subjectMap [ rr:template "http://example.com/Patient/{\"ID\"}"; ];

    rr:predicateObjectMap
    [
		rr:predicate	rdf:type;
		rr:object		foaf:Person;
	];

    rr:predicateObjectMap
    [
      rr:predicate		ex:paid;
      rr:objectMap		[ rml:reference "\"PaidInAdvance\"";  ]
    ];
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient10> <http://example.com/paid> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient11> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient12> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .

2.266 RMLTC0016d-PostgreSQL

Title: Table with datatypes, boolean conversions

Description: Tests the rr:termtype and datatype conversions: boolean

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Patient\"" ];

    rr:subjectMap [ rr:template "http://example.com/Patient/{\"ID\"}"; ];

    rr:predicateObjectMap
    [
		rr:predicate	rdf:type;
		rr:object		foaf:Person;
	];

    rr:predicateObjectMap
    [
      rr:predicate		ex:paid;
      rr:objectMap		[ rml:reference "\"PaidInAdvance\"";  ]
    ];
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient10> <http://example.com/paid> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient11> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient12> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .

2.267 RMLTC0016d-SQLServer

Title: Table with datatypes, boolean conversions

Description: Tests the rr:termtype and datatype conversions: boolean

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Patient\"" ];

    rr:subjectMap [ rr:template "http://example.com/Patient/{\"ID\"}"; ];

    rr:predicateObjectMap
    [
		rr:predicate	rdf:type;
		rr:object		foaf:Person;
	];

    rr:predicateObjectMap
    [
      rr:predicate		ex:paid;
      rr:objectMap		[ rml:reference "\"PaidInAdvance\"";  ]
    ];
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient10> <http://example.com/paid> "false"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient11> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .
<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient12> <http://example.com/paid> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> .

2.268 RMLTC0016e-MySQL

Title: Table with datatypes, binary column

Description: Tests the rr:termtype and datatype conversions: binary

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Patient\"" ];

    rr:subjectMap [ rr:template "http://example.com/Patient/{\"ID\"}"; ];

    rr:predicateObjectMap
    [
		rr:predicate	rdf:type;
		rr:object		foaf:Person;
	];

    rr:predicateObjectMap
    [
      rr:predicate	ex:photo;
      rr:objectMap	[ rr:template "data:image/png;hex,{\"Photo\"}"; ];
    ];
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient10> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient11> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient12> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .

2.269 RMLTC0016e-PostgreSQL

Title: Table with datatypes, binary column

Description: Tests the rr:termtype and datatype conversions: binary

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Patient\"" ];

    rr:subjectMap [ rr:template "http://example.com/Patient/{\"ID\"}"; ];

    rr:predicateObjectMap
    [
		rr:predicate	rdf:type;
		rr:object		foaf:Person;
	];

    rr:predicateObjectMap
    [
      rr:predicate	ex:photo;
      rr:objectMap	[ rr:template "data:image/png;hex,{\"Photo\"}"; ];
    ];
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient10> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient11> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient12> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .

2.270 RMLTC0016e-SQLServer

Title: Table with datatypes, binary column

Description: Tests the rr:termtype and datatype conversions: binary

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Patient\"" ];

    rr:subjectMap [ rr:template "http://example.com/Patient/{\"ID\"}"; ];

    rr:predicateObjectMap
    [
		rr:predicate	rdf:type;
		rr:object		foaf:Person;
	];

    rr:predicateObjectMap
    [
      rr:predicate	ex:photo;
      rr:objectMap	[ rr:template "data:image/png;hex,{\"Photo\"}"; ];
    ];
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/Patient10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient10> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
<http://example.com/Patient11> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient11> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFF3FC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .
<http://example.com/Patient12> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/Patient12> <http://example.com/photo> <data:image/png;hex,89504E470D0A1A0A0000000D49484452000000050000000508060000008D6F26E50000001C4944415408D763F9FFFEBFC37F062005C3201284D031F18258CD04000EF535CBD18E0E1F0000000049454E44AE426082> .

2.271 RMLTC0018a-MySQL

Title: Generation of triples by using CHAR datatype column

Description: Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Student\"" ];

    rr:subjectMap [ rr:template "http://example.com/{\"ID\"}"; rr:class foaf:Person];

    rr:predicateObjectMap
    [
      rr:predicate		ex:id ;
      rr:objectMap		[ rml:reference "\"ID\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		foaf:name ;
      rr:objectMap		[ rml:reference "\"Name\"" ]
    ]
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/10> <http://xmlns.com/foaf/0.1/name> "Venus          " .
<http://example.com/10> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/20> <http://xmlns.com/foaf/0.1/name> "Fernando       " .
<http://example.com/20> <http://example.com/id> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/30> <http://xmlns.com/foaf/0.1/name> "David          " .
<http://example.com/30> <http://example.com/id> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/30> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.272 RMLTC0018a-PostgreSQL

Title: Generation of triples by using CHAR datatype column

Description: Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Student\"" ];

    rr:subjectMap [ rr:template "http://example.com/{\"ID\"}"; rr:class foaf:Person];

    rr:predicateObjectMap
    [
      rr:predicate		ex:id ;
      rr:objectMap		[ rml:reference "\"ID\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		foaf:name ;
      rr:objectMap		[ rml:reference "\"Name\"" ]
    ]
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/10> <http://xmlns.com/foaf/0.1/name> "Venus          " .
<http://example.com/10> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/20> <http://xmlns.com/foaf/0.1/name> "Fernando       " .
<http://example.com/20> <http://example.com/id> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/30> <http://xmlns.com/foaf/0.1/name> "David          " .
<http://example.com/30> <http://example.com/id> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/30> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.273 RMLTC0018a-SQLServer

Title: Generation of triples by using CHAR datatype column

Description: Generation of triples by using CHAR datatype column, resulting RDF literal is space-padded.

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .


<TriplesMap1>
    a rr:TriplesMap;

	rml:logicalSource [ rml:source <#DB_source>; rr:sqlVersion rr:SQL2008; rr:tableName "\"Student\"" ];

    rr:subjectMap [ rr:template "http://example.com/{\"ID\"}"; rr:class foaf:Person];

    rr:predicateObjectMap
    [
      rr:predicate		ex:id ;
      rr:objectMap		[ rml:reference "\"ID\""; ]
    ];

    rr:predicateObjectMap
    [
      rr:predicate		foaf:name ;
      rr:objectMap		[ rml:reference "\"Name\"" ]
    ]
    .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/10> <http://xmlns.com/foaf/0.1/name> "Venus          " .
<http://example.com/10> <http://example.com/id> "10"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/10> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/20> <http://xmlns.com/foaf/0.1/name> "Fernando       " .
<http://example.com/20> <http://example.com/id> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/20> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/30> <http://xmlns.com/foaf/0.1/name> "David          " .
<http://example.com/30> <http://example.com/id> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
<http://example.com/30> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.274 RMLTC0019a-CSV

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in columns

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rml:reference "FirstName" ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .

2.275 RMLTC0019a-JSON

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in columns

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.persons[*]"
  ];

  rr:subjectMap [ rml:reference "FirstName" ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .

2.276 RMLTC0019a-MySQL

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in columns

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
     rml:source <#DB_source>;
     rr:sqlVersion rr:SQL2008;
     rml:query """
                           SELECT "ID", "FirstName", "LastName"
                           FROM "Employee"
                           WHERE "ID" < 30
                           """
                           ];
  ];

  rr:subjectMap [ rml:reference "\"FirstName\"" ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "\"FirstName\""
    ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .

2.277 RMLTC0019a-PostgreSQL

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in columns

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
     rml:source <#DB_source>;
     rr:sqlVersion rr:SQL2008;
     rml:query """
                           SELECT "ID", "FirstName", "LastName"
                           FROM "Employee"
                           WHERE "ID" < 30
                           """
                           ];
  ];

  rr:subjectMap [ rml:reference "\"FirstName\"" ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "\"FirstName\""
    ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .

2.278 RMLTC0019a-SQLServer

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in columns

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
     rml:source <#DB_source>;
     rr:sqlVersion rr:SQL2008;
     rml:query """
                           SELECT "ID", "FirstName", "LastName"
                           FROM "Employee"
                           WHERE "ID" < 30
                           """
                           ];
  ];

  rr:subjectMap [ rml:reference "\"FirstName\"" ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "\"FirstName\""
    ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .

2.279 RMLTC0019a-XML

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in columns

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/persons/person"
  ];

  rr:subjectMap [ rml:reference "FirstName" ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .

2.280 RMLTC0019b-CSV

Title: Generation of triples by using IRI value in columns, with data error

Description: Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [ rml:reference "FirstName" ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .

2.281 RMLTC0019b-JSON

Title: Generation of triples by using IRI value in columns, with data error

Description: Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.persons[*]"
  ];

  rr:subjectMap [ rml:reference "FirstName" ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .

2.282 RMLTC0019b-MySQL

Title: Generation of triples by using IRI value in columns, with data error

Description: Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
     rml:source <#DB_source>;
     rr:sqlVersion rr:SQL2008;
     rr:tableName "\"Employee\""
  ];

  rr:subjectMap [ rml:reference "\"FirstName\"" ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "\"FirstName\""
    ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .

2.283 RMLTC0019b-PostgreSQL

Title: Generation of triples by using IRI value in columns, with data error

Description: Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
     rml:source <#DB_source>;
     rr:sqlVersion rr:SQL2008;
     rr:tableName "\"Employee\""
  ];

  rr:subjectMap [ rml:reference "\"FirstName\"" ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "\"FirstName\""
    ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .

2.284 RMLTC0019b-SQLServer

Title: Generation of triples by using IRI value in columns, with data error

Description: Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
     rml:source <#DB_source>;
     rr:sqlVersion rr:SQL2008;
     rr:tableName "\"Employee\""
  ];

  rr:subjectMap [ rml:reference "\"FirstName\"" ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "\"FirstName\""
    ]
  ] .

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .

2.285 RMLTC0019b-XML

Title: Generation of triples by using IRI value in columns, with data error

Description: Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "persons.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/persons/person"
  ];

  rr:subjectMap [ rml:reference "FirstName" ];

  rr:predicateObjectMap [
    rr:predicate foaf:name;
    rr:objectMap [
      rml:reference "FirstName"
    ]
  ] .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/ns#Jhon> <http://xmlns.com/foaf/0.1/name> "http://example.com/ns#Jhon" .
<http://example.com/base/Carlos> <http://xmlns.com/foaf/0.1/name> "Carlos" .

2.286 RMLTC0020a-CSV

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in columns

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];

  rr:subjectMap [
    rr:template "{Name}";
    rr:termType rr:IRI
  ];

  rr:predicateObjectMap [
    rr:predicate rdf:type;
    rr:object foaf:Person
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.287 RMLTC0020a-JSON

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in columns

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;

  rml:logicalSource [
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];

  rr:subjectMap [
    rr:template "{Name}";
    rr:termType rr:IRI
  ];

  rr:predicateObjectMap [
    rr:predicate rdf:type;
    rr:object foaf:Person
  ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.288 RMLTC0020a-MySQL

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in columns

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml:    <http://semweb.mmlab.be/ns/rml#> .
@prefix ql:     <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"Student\""
  ];

    rr:subjectMap [ rr:template "{Name}"; rr:termType rr:IRI; ];

    rr:predicateObjectMap
    [
    	rr:predicate rdf:type;
    	rr:object foaf:Person;
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.289 RMLTC0020a-PostgreSQL

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in columns

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml:    <http://semweb.mmlab.be/ns/rml#> .
@prefix ql:     <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"Student\""
  ];

    rr:subjectMap [ rr:template "{Name}"; rr:termType rr:IRI; ];

    rr:predicateObjectMap
    [
    	rr:predicate rdf:type;
    	rr:object foaf:Person;
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "password" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.290 RMLTC0020a-SQLServer

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in columns

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml:    <http://semweb.mmlab.be/ns/rml#> .
@prefix ql:     <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"Student\""
  ];

    rr:subjectMap [ rr:template "{Name}"; rr:termType rr:IRI; ];

    rr:predicateObjectMap
    [
    	rr:predicate rdf:type;
    	rr:object foaf:Person;
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";

  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.291 RMLTC0020a-XML

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in columns

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml:    <http://semweb.mmlab.be/ns/rml#> .
@prefix ql:     <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
  rml:logicalSource [
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];

    rr:subjectMap [     rr:template "{Name}";
                        rr:termType rr:IRI ];

    rr:predicateObjectMap
    [
    	rr:predicate rdf:type;
    	rr:object foaf:Person;
    ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/base/http%3A%2F%2Fexample.com%2Fcompany%2FAlice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob%2FCharles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/path%2F..%2FDanny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Emily%20Smith> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.292 RMLTC0020b-CSV

Title: Generation of triples by using IRI value in columns, with data errors

Description: Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml:    <http://semweb.mmlab.be/ns/rml#> .
@prefix ql:     <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
  rml:logicalSource [
    rml:source "student.csv";
    rml:referenceFormulation ql:CSV
  ];
    
    rr:subjectMap [ rml:reference "Name"; rr:termType rr:IRI; ];
    
    rr:predicateObjectMap 
    [
    	rr:predicate rdf:type;
    	rr:object foaf:Person;
    ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/base/Bob/Charles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/company/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/path/../Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.293 RMLTC0020b-JSON

Title: Generation of triples by using IRI value in columns, with data errors

Description: Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml:    <http://semweb.mmlab.be/ns/rml#> .
@prefix ql:     <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
  rml:logicalSource [
    rml:source "student.json";
    rml:referenceFormulation ql:JSONPath;
    rml:iterator "$.students[*]"
  ];
    
    rr:subjectMap [ rml:reference "Name"; rr:termType rr:IRI; ];
    
    rr:predicateObjectMap 
    [
    	rr:predicate rdf:type;
    	rr:object foaf:Person;
    ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/base/Bob/Charles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/company/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/path/../Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.294 RMLTC0020b-MySQL

Title: Generation of triples by using IRI value in columns, with data errors

Description: Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml:    <http://semweb.mmlab.be/ns/rml#> .
@prefix ql:     <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"Student\""
  ];
    
    rr:subjectMap [ rml:reference "Name"; rr:termType rr:IRI; ];
    
    rr:predicateObjectMap 
    [
    	rr:predicate rdf:type;
    	rr:object foaf:Person;
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "com.mysql.cj.jdbc.Driver";
  d2rq:username "root";
  d2rq:password "" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/base/Bob/Charles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/company/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/path/../Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.295 RMLTC0020b-PostgreSQL

Title: Generation of triples by using IRI value in columns, with data errors

Description: Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml:    <http://semweb.mmlab.be/ns/rml#> .
@prefix ql:     <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"Student\""
  ];
    
    rr:subjectMap [ rml:reference "Name"; rr:termType rr:IRI; ];
    
    rr:predicateObjectMap 
    [
    	rr:predicate rdf:type;
    	rr:object foaf:Person;
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";
  d2rq:jdbcDriver "org.postgresql.Driver";
  d2rq:username "postgres";
  d2rq:password "password" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/base/Bob/Charles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/company/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/path/../Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.296 RMLTC0020b-SQLServer

Title: Generation of triples by using IRI value in columns, with data errors

Description: Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml:    <http://semweb.mmlab.be/ns/rml#> .
@prefix ql:     <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
  rml:logicalSource [
    rml:source <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rr:tableName "\"Student\""
  ];
    
    rr:subjectMap [ rml:reference "Name"; rr:termType rr:IRI; ];
    
    rr:predicateObjectMap 
    [
    	rr:predicate rdf:type;
    	rr:object foaf:Person;
    ].

<#DB_source> a d2rq:Database;
  d2rq:jdbcDSN "CONNECTIONDSN";

  d2rq:jdbcDriver "com.microsoft.sqlserver.jdbc.SQLServerDriver";
  d2rq:username "sa";
  d2rq:password "YourSTRONG!Passw0rd;" .

Error expected: No

Expected knowledge graph: (download)

<http://example.com/base/Bob/Charles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/company/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/path/../Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .

2.297 RMLTC0020b-XML

Title: Generation of triples by using IRI value in columns, with data errors

Description: Test the generation of triples by using IRI value in columns, conforming R2RML mapping with data error (and no result)

RML rules (download):

@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.com/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml:    <http://semweb.mmlab.be/ns/rml#> .
@prefix ql:     <http://semweb.mmlab.be/ns/ql#> .

@base <http://example.com/base/> .

<TriplesMap1>
  a rr:TriplesMap;
  rml:logicalSource [
    rml:source "student.xml";
    rml:referenceFormulation ql:XPath;
    rml:iterator "/students/student"
  ];
    
    rr:subjectMap [ rml:reference "Name"; rr:termType rr:IRI; ];
    
    rr:predicateObjectMap 
    [
    	rr:predicate rdf:type;
    	rr:object foaf:Person;
    ].

Error expected: No

Expected knowledge graph: (download)

<http://example.com/base/Bob/Charles> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/Bob> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/company/Alice> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.com/base/path/../Danny> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .