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. Data model

We describe the test cases semantically to increase their reusability and sharability. To this end, we created a semantic data model, with as main entity the test case (see figure below). For each test case, the following details are described: unique identifier, title, description, relevant aspect of the RML specification, data sources (optional), expected knowledge graph or error, and RML rules.

To provide the corresponding semantic descriptions, the model uses mostly the Evaluation and Report Language (EARL) 1.0 Schema, the Test case manifest vocabulary, the Test Metadata vocabulary, and the Data Catalog Vocabulary. A test case is annotated with the classes earl:TestCase, test:TestCase, and mf:ManifestEntry. The identifier, title, description, and the specific aspect of the RML specification that is being tested are added as datatype properties. The files that are provided as input to the tools are linked to the test cases via test:informationResourceInput and dcterms:hasPart. The file with the RML rules is also linked via rml-tc:rules. The objects of these properties are of the class dcat:Dataset, which in turn link to a dcat:Distribution that includes a link to a file. The expected output, whether that is a knowledge graph or an error, is linked via test:expectedResults, mf:result, and dcterms:hasPart. In the case of a knowledge graph, the object of these properties is a dcat:Dataset, linked to a dcat:Distribution, to describe the file containing the graph. In the case of an error, we link to the expected error.

3. 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:

3.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

3.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

3.3 RMLTC0000-MySQL

Title: one table, one column, zero rows

Description: Tests if an empty table produces an empty RDF graph (specification 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#> .
@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

3.4 RMLTC0000-PostgreSQL

Title: one table, one column, zero rows

Description: Tests if an empty table produces an empty RDF graph (specification 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#> .
@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

3.5 RMLTC0000-SQLServer

Title: one table, one column, zero rows

Description: Tests if an empty table produces an empty RDF graph (specification 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#> .
@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

3.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

3.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" .

3.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" .

3.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 (specification 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#> .
@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" .

3.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 (specification 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#> .
@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" .

3.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 (specification 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#> .
@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" .

3.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" .

3.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" .

3.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" .

3.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 (specification 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#> .
@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" .

3.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 (specification 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#> .
@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" .

3.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 (specification 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#> .
@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" .

3.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" .

3.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> .

3.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> .

3.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 (specification 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: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> .

3.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 (specification 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: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> .

3.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 (specification 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: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> .

3.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> .

3.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" .

3.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" .

3.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 (specification 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: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" .

3.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 (specification 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: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" .

3.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 (specification 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: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" .

3.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" .

3.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.

3.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.

3.33 RMLTC0002c-MySQL

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

Description: Tests the presence of an undefined SQL identifier / logical reference (specification 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.

3.34 RMLTC0002c-PostgreSQL

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

Description: Tests the presence of an undefined SQL identifier / logical reference (specification 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.

3.35 RMLTC0002c-SQLServer

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

Description: Tests the presence of an undefined SQL identifier / logical reference (specification 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.

3.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.

3.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 (specification 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:sqlVersion rr:SQL2008;
    rml:query "SELECT CONCAT('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".

3.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 (specification 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: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".

3.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 (specification 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:sqlVersion rr:SQL2008;
    rml:query "SELECT CONCAT('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".

3.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.

3.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.

3.42 RMLTC0002e-MySQL

Title: Two columns mapping, an undefined rr:tableName

Description: Tests the presence of an undefined rr:tableName (specification 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: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.

3.43 RMLTC0002e-PostgreSQL

Title: Two columns mapping, an undefined rr:tableName

Description: Tests the presence of an undefined rr:tableName (specification 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: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.

3.44 RMLTC0002e-SQLServer

Title: Two columns mapping, an undefined rr:tableName

Description: Tests the presence of an undefined rr:tableName (specification 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: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.

3.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.

3.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 (specification 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: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.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.

3.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 (specification 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: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: Yes

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

3.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 (specification 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: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: Yes

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

3.49 RMLTC0002g-MySQL

Title: Two columns mapping, invalid SQL query

Description: Tests the presence of an invalid SQL query (specification 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: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.

3.50 RMLTC0002g-PostgreSQL

Title: Two columns mapping, invalid SQL query

Description: Tests the presence of an invalid SQL query (specification 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: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.

3.51 RMLTC0002g-SQLServer

Title: Two columns mapping, invalid SQL query

Description: Tests the presence of an invalid SQL query (specification 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: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.

3.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 (specification 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: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.

3.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 (specification 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: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.

3.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 (specification 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: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.

3.55 RMLTC0002i-MySQL

Title: Two columns mapping, SQL Version identifier

Description: Tests the presence of a SQL Version identifier (specification 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>;
    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)


            
        

3.56 RMLTC0002i-PostgreSQL

Title: Two columns mapping, SQL Version identifier

Description: Tests the presence of a SQL Version identifier (specification 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>;
    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)


            
        

3.57 RMLTC0002i-SQLServer

Title: Two columns mapping, SQL Version identifier

Description: Tests the presence of a SQL Version identifier (specification 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>;
    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)


            
        

3.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 (specification 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: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)


            
        

3.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 (specification 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: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)


            
        

3.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 (specification 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: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)


            
        

3.61 RMLTC0003a-MySQL

Title: Three columns mapping, undefined SQL Version identifier

Description: Tests the presence of an undefined SQL Version identifier (specification 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>;
    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.

3.62 RMLTC0003a-PostgreSQL

Title: Three columns mapping, undefined SQL Version identifier

Description: Tests the presence of an undefined SQL Version identifier (specification 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>;
    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.

3.63 RMLTC0003a-SQLServer

Title: Three columns mapping, undefined SQL Version identifier

Description: Tests the presence of an undefined SQL Version identifier (specification 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>;
    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.

3.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 (specification 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: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" .

3.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 (specification 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: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" .

3.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 (specification 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: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" .

3.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" .

3.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" .

3.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 (specification 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: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" .

3.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 (specification 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: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" .

3.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 (specification 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: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" .

3.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" .

3.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> .

3.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> .

3.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 (specification 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: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> .

3.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 (specification 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: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> .

3.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 (specification 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: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> .

3.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> .

3.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.

3.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.

3.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 (specification 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#> .
@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.

3.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 (specification 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#> .
@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.

3.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 (specification 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#> .
@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.

3.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.

3.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" .

3.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" .

3.87 RMLTC0005a-MySQL

Title: Typing of resources

Description: Tests the typing of resources (specification 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#> .
@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 "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> .

3.88 RMLTC0005a-PostgreSQL

Title: Typing of resources

Description: Tests the typing of resources (specification 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#> .
@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 "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> .

3.89 RMLTC0005a-SQLServer

Title: Typing of resources

Description: Tests the typing of resources (specification 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#> .
@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 "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> .

3.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" .

3.91 RMLTC0005b-MySQL

Title: Default mapping

Description: Tests the generation of a default mapping for tables without a primary key (specification 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#> .
@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}";
    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)

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

3.92 RMLTC0005b-PostgreSQL

Title: Default mapping

Description: Tests the generation of a default mapping for tables without a primary key (specification 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#> .
@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}";
    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)

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

3.93 RMLTC0005b-SQLServer

Title: Default mapping

Description: Tests the generation of a default mapping for tables without a primary key (specification 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#> .
@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}";
    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)

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

3.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 (specification 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: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> .

3.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 (specification 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: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> .

3.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 (specification 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: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> .

3.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 (specification 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: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> .

3.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 (specification 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: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> .

3.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 (specification 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: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> .

3.100 RMLTC0007a-CSV

Title: Typing resources by relying on rdf:type predicate

Description: Tests the typing resources by relying on rdf:type predicate (specification 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#> .
@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> .

3.101 RMLTC0007a-JSON

Title: Typing resources by relying on rdf:type predicate

Description: Tests the typing resources by relying on rdf:type predicate (specification 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/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> .

3.102 RMLTC0007a-MySQL

Title: Typing resources by relying on rdf:type predicate

Description: Tests the typing resources by relying on rdf:type predicate (specification 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#> .
@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> .

3.103 RMLTC0007a-PostgreSQL

Title: Typing resources by relying on rdf:type predicate

Description: Tests the typing resources by relying on rdf:type predicate (specification 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#> .
@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> .

3.104 RMLTC0007a-SQLServer

Title: Typing resources by relying on rdf:type predicate

Description: Tests the typing resources by relying on rdf:type predicate (specification 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#> .
@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> .

3.105 RMLTC0007a-XML

Title: Typing resources by relying on rdf:type predicate

Description: Tests the typing resources by relying on rdf:type predicate (specification 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#> .
@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.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> .

3.106 RMLTC0007b-CSV

Title: Assigning triples to Named Graphs

Description: Tests the generation of triples to a named graph (specification 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#> .
@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> .

3.107 RMLTC0007b-JSON

Title: Assigning triples to Named Graphs

Description: Tests the generation of triples to a named graph (specification 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#> .
@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.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> .

3.108 RMLTC0007b-MySQL

Title: Assigning triples to Named Graphs

Description: Tests the generation of triples to a named graph (specification 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#> .
@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> .

3.109 RMLTC0007b-PostgreSQL

Title: Assigning triples to Named Graphs

Description: Tests the generation of triples to a named graph (specification 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#> .
@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> .

3.110 RMLTC0007b-SQLServer

Title: Assigning triples to Named Graphs

Description: Tests the generation of triples to a named graph (specification 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#> .
@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> .

3.111 RMLTC0007b-XML

Title: Assigning triples to Named Graphs

Description: Tests the generation of triples to a named graph (specification 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/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> .

3.112 RMLTC0007c-CSV

Title: One row mapping, using rr:class

Description: Tests subjectmap with more than one class IRIs, rr:class (specification 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/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> .

3.113 RMLTC0007c-JSON

Title: One row mapping, using rr:class

Description: Tests subjectmap with more than one class IRIs, rr:class (specification 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/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> .

3.114 RMLTC0007c-MySQL

Title: One row mapping, using rr:class

Description: Tests subjectmap with more than one class IRIs, rr:class (specification 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: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> .

3.115 RMLTC0007c-PostgreSQL

Title: One row mapping, using rr:class

Description: Tests subjectmap with more than one class IRIs, rr:class (specification 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: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> .

3.116 RMLTC0007c-SQLServer

Title: One row mapping, using rr:class

Description: Tests subjectmap with more than one class IRIs, rr:class (specification 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: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> .

3.117 RMLTC0007c-XML

Title: One row mapping, using rr:class

Description: Tests subjectmap with more than one class IRIs, rr:class (specification 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/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> .

3.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 (specification 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/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> .

3.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 (specification 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#> .
@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.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> .

3.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 (specification 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: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;
    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> .

3.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 (specification 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: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;
    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> .

3.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 (specification 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: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;
    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> .

3.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 (specification 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/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> .

3.124 RMLTC0007e-CSV

Title: One column mapping, using rr:graphMap and rr:class

Description: Tests subjectmap with rr:graphMap and rr:class (specification 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/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> .

3.125 RMLTC0007e-JSON

Title: One column mapping, using rr:graphMap and rr:class

Description: Tests subjectmap with rr:graphMap and rr:class (specification 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/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> .

3.126 RMLTC0007e-MySQL

Title: One column mapping, using rr:graphMap and rr:class

Description: Tests subjectmap with rr:graphMap and rr:class (specification 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: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"; ]
  ];

  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://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> .

3.127 RMLTC0007e-PostgreSQL

Title: One column mapping, using rr:graphMap and rr:class

Description: Tests subjectmap with rr:graphMap and rr:class (specification 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: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"; ]
  ];

  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://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> .

3.128 RMLTC0007e-SQLServer

Title: One column mapping, using rr:graphMap and rr:class

Description: Tests subjectmap with rr:graphMap and rr:class (specification 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: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"; ]
  ];

  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://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> .

3.129 RMLTC0007e-XML

Title: One column mapping, using rr:graphMap and rr:class

Description: Tests subjectmap with rr:graphMap and rr:class (specification 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/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> .

3.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 (specification 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/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> .

3.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 (specification 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/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> .

3.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 (specification 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: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> .

3.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 (specification 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: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> .

3.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 (specification 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: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> .

3.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 (specification 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#> .
@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.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> .

3.136 RMLTC0007g-CSV

Title: Assigning triples to the default graph

Description: Tests the generation of triples to the default graph (specification 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/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" .

3.137 RMLTC0007g-JSON

Title: Assigning triples to the default graph

Description: Tests the generation of triples to the default graph (specification 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/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" .

3.138 RMLTC0007g-MySQL

Title: Assigning triples to the default graph

Description: Tests the generation of triples to the default graph (specification 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: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" .

3.139 RMLTC0007g-PostgreSQL

Title: Assigning triples to the default graph

Description: Tests the generation of triples to the default graph (specification 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: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" .

3.140 RMLTC0007g-SQLServer

Title: Assigning triples to the default graph

Description: Tests the generation of triples to the default graph (specification 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: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" .

3.141 RMLTC0007g-XML

Title: Assigning triples to the default graph

Description: Tests the generation of triples to the default graph (specification 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/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" .

3.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 (specification 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/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)


            
        

3.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 (specification 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/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)


            
        

3.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 (specification 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: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)


            
        

3.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 (specification 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: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)


            
        

3.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 (specification 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: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)


            
        

3.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 (specification 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/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)


            
        

3.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 (specification 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#> .
@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}/{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> .

3.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 (specification 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/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> .

3.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 (specification 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: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> .

3.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 (specification 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: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> .

3.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 (specification 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: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> .

3.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 (specification 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/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> .

3.154 RMLTC0008b-CSV

Title: Generation of triples referencing object map

Description: Tests the mapping specification referencing object map without join (specification 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#> .
@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> .

3.155 RMLTC0008b-JSON

Title: Generation of triples referencing object map

Description: Tests the mapping specification referencing object map without join (specification 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#> .
@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> .

3.156 RMLTC0008b-MySQL

Title: Generation of triples referencing object map

Description: Tests the mapping specification referencing object map without join (specification 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#> .
@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> .

3.157 RMLTC0008b-PostgreSQL

Title: Generation of triples referencing object map

Description: Tests the mapping specification referencing object map without join (specification 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#> .
@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> .

3.158 RMLTC0008b-SQLServer

Title: Generation of triples referencing object map

Description: Tests the mapping specification referencing object map without join (specification 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#> .
@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> .

3.159 RMLTC0008b-XML

Title: Generation of triples referencing object map

Description: Tests the mapping specification referencing object map without join (specification 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#> .
@prefix activity: <http://example.com/activity/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@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> .

3.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"  .

3.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"  .

3.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 (specification 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#> .
@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"  .

3.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 (specification 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#> .
@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"  .

3.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 (specification 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#> .
@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"  .

3.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"  .

3.166 RMLTC0009a-CSV

Title: Generation of triples from foreign key relations

Description: Test foreign key relationships among logical tables (specification 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#> .
@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>  .

3.167 RMLTC0009a-JSON

Title: Generation of triples from foreign key relations

Description: Test foreign key relationships among logical tables (specification 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#> .
@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>  .

3.168 RMLTC0009a-MySQL

Title: Generation of triples from foreign key relations

Description: Test foreign key relationships among logical tables (specification 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#> .
@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>  .

3.169 RMLTC0009a-PostgreSQL

Title: Generation of triples from foreign key relations

Description: Test foreign key relationships among logical tables (specification 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#> .
@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>  .

3.170 RMLTC0009a-SQLServer

Title: Generation of triples from foreign key relations

Description: Test foreign key relationships among logical tables (specification 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#> .
@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>  .

3.171 RMLTC0009a-XML

Title: Generation of triples from foreign key relations

Description: Test foreign key relationships among logical tables (specification 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#> .
@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>  .

3.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. (specification 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#> .
@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> .

3.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. (specification 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#> .
@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> .

3.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. (specification 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#> .
@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> .

3.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. (specification 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#> .
@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> .

3.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. (specification 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#> .
@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> .

3.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. (specification 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#> .
@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> .

3.178 RMLTC0009c-MySQL

Title: Unnamed column in a logical table

Description: Test a logical table with unnamed column. (specification 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#> .
@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" .

3.179 RMLTC0009c-PostgreSQL

Title: Unnamed column in a logical table

Description: Test a logical table with unnamed column. (specification 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#> .
@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" .

3.180 RMLTC0009c-SQLServer

Title: Unnamed column in a logical table

Description: Test a logical table with unnamed column. (specification 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#> .
@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" .

3.181 RMLTC0009d-MySQL

Title: Named column in logical table

Description: Test a logical table named column. (specification 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#> .
@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> .

3.182 RMLTC0009d-PostgreSQL

Title: Named column in logical table

Description: Test a logical table named column. (specification 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#> .
@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> .

3.183 RMLTC0009d-SQLServer

Title: Named column in logical table

Description: Test a logical table named column. (specification 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#> .
@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> .

3.184 RMLTC0010a-CSV

Title: Template with table column with special chars

Description: Tests a template with blank space in column value (specification 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#> .
@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)" .

3.185 RMLTC0010a-JSON

Title: Template with table column with special chars

Description: Tests a template with blank space in column value (specification 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#> .
@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)" .

3.186 RMLTC0010a-MySQL

Title: Template with table column with special chars

Description: Tests a template with blank space in column value (specification 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#> .
@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)" .

3.187 RMLTC0010a-PostgreSQL

Title: Template with table column with special chars

Description: Tests a template with blank space in column value (specification 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#> .
@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)" .

3.188 RMLTC0010a-SQLServer

Title: Template with table column with special chars

Description: Tests a template with blank space in column value (specification 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#> .
@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)" .

3.189 RMLTC0010b-CSV

Title: Template with table columns with special chars

Description: Tests a template with special chars in column value (specification 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#> .
@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)" .

3.190 RMLTC0010b-JSON

Title: Template with table columns with special chars

Description: Tests a template with special chars in column value (specification 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#> .
@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)" .

3.191 RMLTC0010b-MySQL

Title: Template with table columns with special chars

Description: Tests a template with special chars in column value (specification 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#> .
@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)" .

3.192 RMLTC0010b-PostgreSQL

Title: Template with table columns with special chars

Description: Tests a template with special chars in column value (specification 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#> .
@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)" .

3.193 RMLTC0010b-SQLServer

Title: Template with table columns with special chars

Description: Tests a template with special chars in column value (specification 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#> .
@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)" .

3.194 RMLTC0010b-XML

Title: Template with table columns with special chars

Description: Tests a template with special chars in column value (specification 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#> .
@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)" .

3.195 RMLTC0010c-CSV

Title: Template with table columns with special chars and backslashes

Description: Tests a template with special chars in reference value and backslash escapes in string templates (specification 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#> .
@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 }}}" .

3.196 RMLTC0010c-JSON

Title: Template with table columns with special chars and backslashes

Description: Tests a template with special chars in reference value and backslash escapes in string templates (specification 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#> .
@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 }}}" .

3.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 (specification 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#> .
@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 }}}" .

3.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 (specification 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#> .
@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 }}}" .

3.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 (specification 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#> .
@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 }}}" .

3.200 RMLTC0010c-XML

Title: Template with table columns with special chars and backslashes

Description: Tests a template with special chars in reference value and backslash escapes in string templates (specification 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#> .
@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 }}}" .

3.201 RMLTC0011a-MySQL

Title: M to M relation, by using a SQL query

Description: Tests, M to M relations, by using a SQL query (specification 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#> .
@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 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;
       """ ;
       rml:referenceFormulation ql:CSV
   ];

    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> .

3.202 RMLTC0011a-PostgreSQL

Title: M to M relation, by using a SQL query

Description: Tests, M to M relations, by using a SQL query (specification 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#> .
@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 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;
       """ ;
       rml:referenceFormulation ql:CSV
   ];

    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> .

3.203 RMLTC0011a-SQLServer

Title: M to M relation, by using a SQL query

Description: Tests, M to M relations, by using a SQL query (specification 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#> .
@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 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;
       """ ;
       rml:referenceFormulation ql:CSV
   ];

    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> .

3.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> .

3.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> .

3.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 (specification 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#> .
@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> .

3.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 (specification 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#> .
@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> .

3.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 (specification 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#> .
@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> .

3.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> .

3.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. (specification 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 "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" .

3.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. (specification 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 "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" .

3.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. (specification 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#> .
@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)

_:Bob_Smith_30 <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
_:Bob_Smith_30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
_:Sue_Jones_20 <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
_:Sue_Jones_20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .

3.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. (specification 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#> .
@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)

_:Bob_Smith_30 <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
_:Bob_Smith_30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
_:Sue_Jones_20 <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
_:Sue_Jones_20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .

3.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. (specification 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#> .
@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)

_:Bob_Smith_30 <http://example.com/amount> "30"^^<http://www.w3.org/2001/XMLSchema#integer> .
_:Bob_Smith_30 <http://xmlns.com/foaf/0.1/name> "Bob Smith" .
_:Sue_Jones_20 <http://example.com/amount> "20"^^<http://www.w3.org/2001/XMLSchema#integer> .
_:Sue_Jones_20 <http://xmlns.com/foaf/0.1/name> "Sue Jones" .

3.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. (specification 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 "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" .

3.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. (specification 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 "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" .

3.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. (specification 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 "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" .

3.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. (specification 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#> .
@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" .

3.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. (specification 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#> .
@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" .

3.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. (specification 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#> .
@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" .

3.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. (specification 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 "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" .

3.222 RMLTC0012c-CSV

Title: TriplesMap without subjectMap

Description: Tests a RML with missing information, TriplesMap without subjectMap. (specification 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 "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.

3.223 RMLTC0012c-JSON

Title: TriplesMap without subjectMap

Description: Tests a RML with missing information, TriplesMap without subjectMap. (specification 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 "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.

3.224 RMLTC0012c-MySQL

Title: TriplesMap without subjectMap

Description: Tests a RML with missing information, TriplesMap without subjectMap. (specification 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#> .
@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: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.

3.225 RMLTC0012c-PostgreSQL

Title: TriplesMap without subjectMap

Description: Tests a RML with missing information, TriplesMap without subjectMap. (specification 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#> .
@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: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.

3.226 RMLTC0012c-SQLServer

Title: TriplesMap without subjectMap

Description: Tests a RML with missing information, TriplesMap without subjectMap. (specification 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#> .
@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: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.

3.227 RMLTC0012c-XML

Title: TriplesMap without subjectMap

Description: Tests a RML with missing information, TriplesMap without subjectMap. (specification 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 "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.

3.228 RMLTC0012d-CSV

Title: TriplesMap with two subjectMap

Description: Tests a RML with wrong information, TriplesMap with two subjectMap. (specification 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 "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.

3.229 RMLTC0012d-JSON

Title: TriplesMap with two subjectMap

Description: Tests a RML with wrong information, TriplesMap with two subjectMap. (specification 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 "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.

3.230 RMLTC0012d-MySQL

Title: TriplesMap with two subjectMap

Description: Tests a RML with wrong information, TriplesMap with two subjectMap. (specification 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#> .
@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: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.

3.231 RMLTC0012d-PostgreSQL

Title: TriplesMap with two subjectMap

Description: Tests a RML with wrong information, TriplesMap with two subjectMap. (specification 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#> .
@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: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.

3.232 RMLTC0012d-SQLServer

Title: TriplesMap with two subjectMap

Description: Tests a RML with wrong information, TriplesMap with two subjectMap. (specification 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#> .
@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: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.

3.233 RMLTC0012d-XML

Title: TriplesMap with two subjectMap

Description: Tests a RML with wrong information, TriplesMap with two subjectMap. (specification 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 "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.

3.234 RMLTC0012e-MySQL

Title: Default mapping

Description: Tests the generation of a default mapping for tables without a primary key. (specification 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 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#> .
@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 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 [
	    rml:source <#DB_source>;
        rr:sqlVersion rr:SQL2008;
	    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)

_:Bob_Smith_30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:Bob_Smith_30 <http://example.com/base/IOUs#fname> "Bob" .
_:Bob_Smith_30 <http://example.com/base/IOUs#lname> "Smith" .
_:Bob_Smith_30 <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:Sue_Jones_20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:Sue_Jones_20 <http://example.com/base/IOUs#fname> "Sue" .
_:Sue_Jones_20 <http://example.com/base/IOUs#lname> "Jones" .
_:Sue_Jones_20 <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:Bob_Smith_London <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
_:Bob_Smith_London <http://example.com/base/IOUs#fname> "Bob" .
_:Bob_Smith_London <http://example.com/base/IOUs#lname> "Smith" .
_:Bob_Smith_London <http://example.com/base/IOUs#city> "London" .
_:Sue_Jones_Madrid <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
_:Sue_Jones_Madrid <http://example.com/base/IOUs#fname> "Sue" .
_:Sue_Jones_Madrid <http://example.com/base/IOUs#lname> "Jones" .
_:Sue_Jones_Madrid <http://example.com/base/IOUs#city> "Madrid" .

3.235 RMLTC0012e-PostgreSQL

Title: Default mapping

Description: Tests the generation of a default mapping for tables without a primary key. (specification 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 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#> .
@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 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 [
	    rml:source <#DB_source>;
        rr:sqlVersion rr:SQL2008;
	    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)

_:Bob_Smith_30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:Bob_Smith_30 <http://example.com/base/IOUs#fname> "Bob" .
_:Bob_Smith_30 <http://example.com/base/IOUs#lname> "Smith" .
_:Bob_Smith_30 <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:Sue_Jones_20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:Sue_Jones_20 <http://example.com/base/IOUs#fname> "Sue" .
_:Sue_Jones_20 <http://example.com/base/IOUs#lname> "Jones" .
_:Sue_Jones_20 <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:Bob_Smith_London <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
_:Bob_Smith_London <http://example.com/base/IOUs#fname> "Bob" .
_:Bob_Smith_London <http://example.com/base/IOUs#lname> "Smith" .
_:Bob_Smith_London <http://example.com/base/IOUs#city> "London" .
_:Sue_Jones_Madrid <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
_:Sue_Jones_Madrid <http://example.com/base/IOUs#fname> "Sue" .
_:Sue_Jones_Madrid <http://example.com/base/IOUs#lname> "Jones" .
_:Sue_Jones_Madrid <http://example.com/base/IOUs#city> "Madrid" .

3.236 RMLTC0012e-SQLServer

Title: Default mapping

Description: Tests the generation of a default mapping for tables without a primary key. (specification 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 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#> .
@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 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 [
	    rml:source <#DB_source>;
        rr:sqlVersion rr:SQL2008;
	    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)

_:Bob_Smith_30 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:Bob_Smith_30 <http://example.com/base/IOUs#fname> "Bob" .
_:Bob_Smith_30 <http://example.com/base/IOUs#lname> "Smith" .
_:Bob_Smith_30 <http://example.com/base/IOUs#amount> "3.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:Sue_Jones_20 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/IOUs> .
_:Sue_Jones_20 <http://example.com/base/IOUs#fname> "Sue" .
_:Sue_Jones_20 <http://example.com/base/IOUs#lname> "Jones" .
_:Sue_Jones_20 <http://example.com/base/IOUs#amount> "2.0E1"^^<http://www.w3.org/2001/XMLSchema#double> .
_:Bob_Smith_London <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
_:Bob_Smith_London <http://example.com/base/IOUs#fname> "Bob" .
_:Bob_Smith_London <http://example.com/base/IOUs#lname> "Smith" .
_:Bob_Smith_London <http://example.com/base/IOUs#city> "London" .
_:Sue_Jones_Madrid <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.com/base/Lives> .
_:Sue_Jones_Madrid <http://example.com/base/IOUs#fname> "Sue" .
_:Sue_Jones_Madrid <http://example.com/base/IOUs#lname> "Jones" .
_:Sue_Jones_Madrid <http://example.com/base/IOUs#city> "Madrid" .

3.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" .

3.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 (specification 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#> .
@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:reference "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" .

3.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 (specification 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#> .
@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:reference "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" .

3.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 (specification 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#> .
@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:reference "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" .

3.241 RMLTC0014d-MySQL

Title: three tables, one primary key, one foreign key

Description: Test the translation of database type codes to IRIs (specification 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/ns#> .
@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#> .
@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 EMP.*, (CASE job
        WHEN 'CLERK' THEN 'general-office'
        WHEN 'NIGHTGUARD' THEN 'security'
        WHEN 'ENGINEER' THEN 'engineering'
      END) AS ROLE FROM EMP
    """ ;
    rml:referenceFormulation ql:CSV
   ];
	
    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> .

3.242 RMLTC0014d-PostgreSQL

Title: three tables, one primary key, one foreign key

Description: Test the translation of database type codes to IRIs (specification 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/ns#> .
@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#> .
@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 EMP.*, (CASE job
        WHEN 'CLERK' THEN 'general-office'
        WHEN 'NIGHTGUARD' THEN 'security'
        WHEN 'ENGINEER' THEN 'engineering'
      END) AS ROLE FROM EMP
    """ ;
    rml:referenceFormulation ql:CSV
   ];
	
    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> .

3.243 RMLTC0014d-SQLServer

Title: three tables, one primary key, one foreign key

Description: Test the translation of database type codes to IRIs (specification 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/ns#> .
@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#> .
@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 EMP.*, (CASE job
        WHEN 'CLERK' THEN 'general-office'
        WHEN 'NIGHTGUARD' THEN 'security'
        WHEN 'ENGINEER' THEN 'engineering'
      END) AS ROLE FROM EMP
    """ ;
    rml:referenceFormulation ql:CSV
   ];

    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> .

3.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 (specification 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 "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 .

3.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 (specification 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 "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 .

3.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 (specification 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#> .
@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 Code, Name, Lan
        FROM Country
        WHERE Lan = 'EN';
       """ ;
     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 <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query """
        SELECT "Code", "Name", "Lan"
        FROM "Country"
        WHERE "Lan" = 'ES';
       """ ;
    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"
    ]
  ].

<#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 .

3.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 (specification 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#> .
@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 Code, Name, Lan
        FROM Country
        WHERE Lan = 'EN';
       """ ;
     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 <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query """
        SELECT "Code", "Name", "Lan"
        FROM "Country"
        WHERE "Lan" = 'ES';
       """ ;
    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"
    ]
  ].

<#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 .

3.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 (specification 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#> .
@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 Code, Name, Lan
        FROM Country
        WHERE Lan = 'EN';
       """ ;
     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 <#DB_source>;
    rr:sqlVersion rr:SQL2008;
    rml:query """
        SELECT "Code", "Name", "Lan"
        FROM "Country"
        WHERE "Lan" = 'ES';
       """ ;
    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"
    ]
  ].

<#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 .

3.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 (specification 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 "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 .

3.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 (specification reference)

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.

3.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 (specification reference)

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.

3.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 (specification 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#> .
@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 Code, Name, Lan
        FROM Country
        WHERE Lan = 'EN';
       """ ;
     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 <#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.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.

3.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 (specification 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#> .
@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 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.

3.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 (specification 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#> .
@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 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.

3.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 (specification reference)

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.

3.256 RMLTC0016a-MySQL

Title: Table with datatypes: string and integer

Description: Tests the rr:termtype and datatype conversions: string and integer (specification reference)

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#> .
@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 "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" .

3.257 RMLTC0016a-PostgreSQL

Title: Table with datatypes: string and integer

Description: Tests the rr:termtype and datatype conversions: string and integer (specification reference)

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#> .
@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 "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" .

3.258 RMLTC0016a-SQLServer

Title: Table with datatypes: string and integer

Description: Tests the rr:termtype and datatype conversions: string and integer (specification reference)

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#> .
@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 "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" .

3.259 RMLTC0016b-MySQL

Title: Table with datatypes: real and float

Description: Tests the rr:termtype and datatype conversions: real and float (specification reference)

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#> .
@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 "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> .

3.260 RMLTC0016b-PostgreSQL

Title: Table with datatypes: real and float

Description: Tests the rr:termtype and datatype conversions: real and float (specification reference)

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#> .
@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 "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> .

3.261 RMLTC0016b-SQLServer

Title: Table with datatypes: real and float

Description: Tests the rr:termtype and datatype conversions: real and float (specification reference)

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#> .
@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 "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> .

3.262 RMLTC0016c-MySQL

Title: Table with datatypes: date and timestamp

Description: Tests the rr:termtype and datatype conversions: date and timestamp (specification reference)

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#> .
@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 "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> .

3.263 RMLTC0016c-PostgreSQL

Title: Table with datatypes: date and timestamp

Description: Tests the rr:termtype and datatype conversions: date and timestamp (specification reference)

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#> .
@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 "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> .

3.264 RMLTC0016c-SQLServer

Title: Table with datatypes: date and timestamp

Description: Tests the rr:termtype and datatype conversions: date and timestamp (specification reference)

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#> .
@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 "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> .

3.265 RMLTC0016d-MySQL

Title: Table with datatypes, boolean conversions

Description: Tests the rr:termtype and datatype conversions: boolean (specification reference)

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#> .
@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 "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> .

3.266 RMLTC0016d-PostgreSQL

Title: Table with datatypes, boolean conversions

Description: Tests the rr:termtype and datatype conversions: boolean (specification reference)

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#> .
@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 "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> .

3.267 RMLTC0016d-SQLServer

Title: Table with datatypes, boolean conversions

Description: Tests the rr:termtype and datatype conversions: boolean (specification reference)

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#> .
@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 "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> .

3.268 RMLTC0016e-MySQL

Title: Table with datatypes, binary column

Description: Tests the rr:termtype and datatype conversions: binary (specification reference)

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#> .
@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 "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> .

3.269 RMLTC0016e-PostgreSQL

Title: Table with datatypes, binary column

Description: Tests the rr:termtype and datatype conversions: binary (specification reference)

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#> .
@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 "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> .

3.270 RMLTC0016e-SQLServer

Title: Table with datatypes, binary column

Description: Tests the rr:termtype and datatype conversions: binary (specification reference)

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#> .
@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 "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> .

3.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. (specification reference)

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#> .
@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/{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> .

3.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. (specification reference)

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#> .
@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/{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> .

3.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. (specification reference)

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#> .
@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/{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> .

3.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" .

3.275 RMLTC0019a-JSON

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in attributes

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" .

3.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 (specification reference)

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#> .
@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 ID, FirstName, LastName
        FROM Employee
        WHERE ID < 30
     """ ;
     rml:referenceFormulation ql:CSV
  ];

  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" .

3.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 (specification reference)

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#> .
@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 ID, FirstName, LastName
        FROM Employee
        WHERE ID < 30
     """ ;
     rml:referenceFormulation ql:CSV
  ];

  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" .

3.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 (specification reference)

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#> .
@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 ID, FirstName, LastName
        FROM Employee
        WHERE ID < 30
     """ ;
     rml:referenceFormulation ql:CSV
  ];

  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" .

3.279 RMLTC0019a-XML

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in elements

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" .

3.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 RML mapping with data error (and limited results)

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" .

3.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 attributes, conforming RML mapping with data error (and limited results)

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" .

3.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 RML mapping with data error (and limited results) (specification reference)

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#> .
@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 "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" .

3.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 RML mapping with data error (and limited results) (specification reference)

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#> .
@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 "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" .

3.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 RML mapping with data error (and limited results) (specification reference)

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#> .
@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 "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" .

3.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 elements, conforming RML mapping with data error (and limited results)

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" .

3.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 (specification reference)

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> .

3.287 RMLTC0020a-JSON

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in attributes (specification reference)

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#> .
@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.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> .

3.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 (specification 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 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#> .
@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 "{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> .

3.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 (specification 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 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#> .
@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 "{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> .

3.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 (specification 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 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#> .
@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 "{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> .

3.291 RMLTC0020a-XML

Title: Generation of triples by using IRI value in columns

Description: Test the generation of triples by using IRI value in elements (specification 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 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> .

3.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> .

3.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> .

3.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) (specification 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 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#> .
@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 [ 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> .

3.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) (specification 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 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#> .
@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 [ 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> .

3.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) (specification 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 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#> .
@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 [ 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> .

3.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> .