Copyright © 2024-2025 the Contributors to the RML-IO: Test Cases Specification, published by the Knowledge Graph Construction Community Group under the W3C Community Contributor License Agreement (CLA). A human-readable summary is available.
This document defines the RML-IO test cases to the determine the RML-IO specification conformance of tools.
This specification was published by the Knowledge Graph Construction Community Group. It is not a W3C Standard nor is it on the W3C Standards Track. Please note that under the W3C Community Contributor License Agreement (CLA) there is a limited opt-out and other conditions apply. Learn more about W3C Community and Business Groups.
GitHub Issues are preferred for discussion of this specification.
This document defines the RML-IO 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-IO specification.
The test cases are semantically described for re-usability and shareability following the W3C Test case description.
Each test:Testcase
as the following properties:
dcterms:identifier
: unique ID of the test case.rmltest:hasError
: if an error of the RML Processor is expected or not.rmltest:input
: One or more input data of the test case.rmltest:output
: One or more output data of the test case.rmltest:inputFormat
: the input data format.rmltest:outputFormat
: the output data format.rmltest:mappingDocument
: the RML mapping rules in Turtle.This section describes the RML-IO 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:
mapping.ttl
, in the Turtle format.Title: Source with UTF-8 encoding
Description: Test source with UTF-8 encoding
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json"
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Source with UTF-16 encoding
Description: Test source with UTF-16 encoding
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends-UTF16.json"
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Source no compression
Description: Test source without compression
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json"
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Source GZip compression
Description: Test source with GZip compression
Error expected? No
Input
Friends.json.gz
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json.gz";
rml:compression rml:gzip;
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Source Zip compression
Description: Test source with ZIP compression
Error expected? No
Input
Friends.json.zip
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json.zip";
rml:compression rml:zip;
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Source TarXz compression
Description: Test source with TarXZ compression
Error expected? No
Input
Friends.json.tar.xz
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json.tar.xz";
rml:compression rml:tarxz;
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Source TarGzip compression
Description: Test source with TarGZip compression
Error expected? No
Input
Friends.json.tar.gz
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json.tar.gz";
rml:compression rml:targz;
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Source with query
Description: Test source which requires a query
Error expected? No
Input
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:path "./Friends.nt";
];
rml:iterator """
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?person ?name ?age WHERE {
?person foaf:name ?name .
?person foaf:age ?age .
}
""";
rml:referenceFormulation formats:SPARQL_Results_CSV;
];
rml:subjectMap [ a rml:SubjectMap;
rml:reference "person";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Source with default NULL values
Description: Test source with default NULL values
Error expected? No
Input
id,name,age
0,Monica Geller,33
1,Rachel Green,34
2,Joey Tribbiani,35
3,Chandler Bing,36
4,Ross Geller,37
5,,
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends-NULL.csv";
];
rml:referenceFormulation rml:CSV;
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Source with one NULL value
Description: Test source with one NULL value defined
Error expected? No
Input
id,name,age
0,Monica Geller,33
1,Rachel Green,34
2,Joey Tribbiani,35
3,Chandler Bing,36
4,Ross Geller,37
5,,
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends-NULL.csv";
rml:null "";
];
rml:referenceFormulation rml:CSV;
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Source with multiple NULL values
Description: Test source with multiple NULL values defined
Error expected? No
Input
id,name,age
0,Monica Geller,33
1,Rachel Green,34
2,Joey Tribbiani,35
3,Chandler Bing,36
4,Ross Geller,37
5,,
6,NULL,NULL
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends-NULL.csv";
rml:null "";
rml:null "NULL";
];
rml:referenceFormulation rml:CSV;
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Error code: 404
Message: File not found.
Error code explanation: 404 - Nothing matches the given URI.
Error code: 404
Message: File not found.
Error code explanation: 404 - Nothing matches the given URI.
Title: Source with D2RQ access description
Description: Test source with D2RQ access description for SQL databases
Error expected? No
Input
id, name, age
0, Monica Geller, 33
1, Rachel Green, 34
2, Joey Tribbiani, 35
3, Chandler Bing, 36
4, Ross Geller, 37
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix d2rq: <http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RQ/0.1#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@base <http://example.com/rules/> .
<#D2RQSourceAccess> a rml:Source, d2rq:Database;
d2rq:jdbcDSN "$CONNECTIONDSN";
d2rq:username "$USERNAME";
d2rq:password "$PASSWORD"
.
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source <#D2RQSourceAccess>;
rml:referenceFormulation rml:SQL2008Table;
rml:iterator "Friends";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Source with a Relative Path Source
Description: Test access to a file
Error expected? No
Input
id, name, age
0, Monica Geller, 33
1, Rachel Green, 34
2, Joey Tribbiani, 35
3, Chandler Bing, 36
4, Ross Geller, 37
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath, rml:Source;
rml:root rml:CurrentWorkingDirectory;
rml:path "./Friends.csv"
];
rml:referenceFormulation rml:CSV;
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Source with JSONPath reference formulation
Description: Test source with JSONPath reference formulation
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
rml:encoding rml:UTF-8
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Source with CSV reference formulation
Description: Test source with Tabular reference formulation
Error expected? No
Input
id,name,age
0,Monica Geller,33
1,Rachel Green,34
2,Joey Tribbiani,35
3,Chandler Bing,36
4,Ross Geller,37
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.csv";
];
rml:referenceFormulation rml:CSV;
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Source with XPath reference formulation
Description: Test source with XPath reference formulation
Error expected? No
Input
<Friends>
<Character id="0">
<name>Monica Geller</name>
<age>33</age>
</Character>
<Character id="1">
<name>Rachel Green</name>
<age>34</age>
</Character>
<Character id="2">
<name>Joey Tribbiani</name>
<age>35</age>
</Character>
<Character id="3">
<name>Chandler Bing</name>
<age>36</age>
</Character>
<Character id="4">
<name>Ross Geller</name>
<age>37</age>
</Character>
</Friends>
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.xml"
];
rml:referenceFormulation rml:XPath;
rml:iterator "//Friends/Character";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{@id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "name/text()";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "age/text()";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Source with XPath reference formulation with namespaces
Description: Test source with XPath reference formulation with namespaces
Error expected? No
Input
<Friends xmlns:ex="http://example.org">
<ex:Character id="0">
<ex:name>Monica Geller</ex:name>
<ex:age>33</ex:age>
</ex:Character>
<ex:Character id="1">
<ex:name>Rachel Green</ex:name>
<ex:age>34</ex:age>
</ex:Character>
<ex:Character id="2">
<ex:name>Joey Tribbiani</ex:name>
<ex:age>35</ex:age>
</ex:Character>
<ex:Character id="3">
<ex:name>Chandler Bing</ex:name>
<ex:age>36</ex:age>
</ex:Character>
<ex:Character id="4">
<ex:name>Ross Geller</ex:name>
<ex:age>37</ex:age>
</ex:Character>
</Friends>
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.xml"
];
rml:referenceFormulation [ a rml:XPathReferenceFormulation;
rml:namespace [ a rml:Namespace;
rml:namespacePrefix "ex";
rml:namespaceURL "http://example.org";
];
];
rml:iterator "//Friends/ex:Character";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{@id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "ex:name/text()";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "ex:age/text()";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Multiple sources of same type
Description: Tests the generation of all triples from multiple homogeneous sources
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
rml:encoding rml:UTF-8
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TriplesMap2> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:RelativePathSource;
rml:root rml:MappingDirectory;
rml:path "Friends2.json";
rml:encoding rml:UTF-8
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
<http://example.org/6> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/6> <http://xmlns.com/foaf/0.1/name> "Phoebe Buffay" .
Title: Multiple sources of different type
Description: Tests the generation of all triples from multiple heterogeneous sources
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
rml:encoding rml:UTF-8
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TriplesMap2> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:RelativePathSource;
rml:root rml:MappingDirectory;
rml:path "Friends.csv";
rml:encoding rml:UTF-8
];
rml:referenceFormulation rml:CSV;
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
<http://example.org/6> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/6> <http://xmlns.com/foaf/0.1/name> "Phoebe Buffay" .
Title: Default target
Description: Test exporting all triples to the default Target when not Targets are specified.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
rml:encoding rml:UTF-8
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
Output
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Single Target: Subject Map
Description: Test exporting all triples to a single Target with a given subject.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Single Target: Predicate Map
Description: Test exporting all triples to a single Target with a given predicate.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
rml:logicalTarget <#TargetDump1>;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Single Target: Object Map
Description: Test exporting all triples to a single Target with a given object reference.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
rml:logicalTarget <#TargetDump1>;
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Single Target: Graph Map
Description: Test exporting all triples within a named graph to a single Target.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@prefix ex: <http://example.org/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:graphMap [ a rml:GraphMap;
rml:constant ex:PeopleGraph;
rml:logicalTarget <#TargetDump1>;
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
Title: Single Target: Language Map
Description: Test exporting all triples with a given language tag to a single Target.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
rml:languageMap [ a rml:LanguageMap;
rml:constant "en";
rml:logicalTarget <#TargetDump1>;
];
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
Title: Single Target: Datatype Map
Description: Test exporting all triples with a given datatype to a single Target.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
rml:datatypeMap [ a rml:DatatypeMap;
rml:constant xsd:integer;
rml:logicalTarget <#TargetDump1>;
];
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer>.
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer>.
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer>.
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer>.
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer>.
Title: Multiple Targets: Same Term Map
Description: Test exporting all triples to multiple Targets in the same Term Map.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
rml:logicalTarget <#TargetDump2>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Multiple Targets: Subject Map and Predicate Map
Description: Test exporting all triples to a Target in a Subject Map and a Target in a Predicate Map.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
rml:logicalTarget <#TargetDump2>;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
Title: Multiple Targets: Subject Map and Object Map
Description: Test exporting all triples to a Target in a Subject Map and a Target in a Object Map.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
rml:logicalTarget <#TargetDump2>;
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
Title: Multiple Targets: Predicate Map and Object Map
Description: Test exporting all triples to a Target in a Predicate Map and a Target in a Object Map.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
rml:logicalTarget <#TargetDump1>;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
rml:logicalTarget <#TargetDump2>;
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
Title: Multiple Targets: Subject Map, Predicate Map, and Object Map
Description: Test exporting all triples to a Target in a Subject Map, a Target in a Predicate Map, and a Target in a Object Map.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump3>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
rml:logicalTarget <#TargetDump1>;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
rml:logicalTarget <#TargetDump2>;
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump3> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump3.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
Title: Multiple Targets: Subject Map and Graph Map
Description: Test exporting all triples to a Target in a Subject Map and a Target in a Graph Map.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@prefix ex: <http://example.org> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:graphMap [ a rml:GraphMap;
rml:constant ex:PeopleGraph;
rml:logicalTarget <#TargetDump2>;
];
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
Title: Multiple Targets: Predicate Map and Graph Map
Description: Test exporting all triples to a Target in a Predicate Map and a Target in a Graph Map.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@prefix ex: <http://example.org> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:graphMap [ a rml:GraphMap;
rml:constant ex:PeopleGraph;
rml:logicalTarget <#TargetDump2>;
];
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
rml:logicalTarget <#TargetDump1>;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
Title: Multiple Targets: Object Map and Graph Map
Description: Test exporting all triples to a Target in a Object Map and a Target in a Graph Map.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@prefix ex: <http://example.org> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:graphMap [ a rml:GraphMap;
rml:constant ex:PeopleGraph;
rml:logicalTarget <#TargetDump2>;
];
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
rml:logicalTarget <#TargetDump1>;
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph>.
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph> .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph> .
Title: Multiple Targets: Language Map and Graph Map
Description: Test exporting all triples to a Target in a Language Map and a Target in a Graph Map.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@prefix ex: <http://example.org> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
rml:languageMap [ a rml:LanguageMap;
rml:constant "en";
rml:logicalTarget <#TargetDump2>;
];
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:graphMap [ a rml:GraphMap;
rml:constant ex:PeopleGraph;
rml:logicalTarget <#TargetDump1>;
];
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph> .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph> .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
Title: Multiple Targets: Language Map and Object Map
Description: Test exporting all triples to a Target in a Language Map and a Target in a Object Map.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@prefix ex: <http://example.org> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
rml:languageMap [ a rml:LanguageMap;
rml:constant "en";
rml:logicalTarget <#TargetDump2>;
];
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
rml:logicalTarget <#TargetDump1>;
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
Title: Multiple Targets: Datatype Map and Graph Map
Description: Test exporting all triples to a Target in a Datatype Map and a Target in a Graph Map.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ex: <http://example.org> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:graphMap [ a rml:GraphMap;
rml:constant ex:PeopleGraph;
rml:logicalTarget <#TargetDump1>;
];
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
rml:datatypeMap [ a rml:DatatypeMap;
rml:constant xsd:integer;
rml:logicalTarget <#TargetDump2>;
];
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
Title: Multiple Targets: Datatype Map and Object Map
Description: Test exporting all triples to a Target in a Datatype Map and a Target in a Object Map.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ex: <http://example.org> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
rml:logicalTarget <#TargetDump1>;
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
rml:datatypeMap [ a rml:DatatypeMap;
rml:constant xsd:integer;
rml:logicalTarget <#TargetDump2>;
];
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer> <http://example.org/PeopleGraph> .
Title: Multiple Targets: Multiple Predicate Maps
Description: Test exporting all triples to Targets in multiple Predicate Maps.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
rml:logicalTarget <#TargetDump1>;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
rml:logicalTarget <#TargetDump2>;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
Title: Multiple Targets: Multiple Object Maps
Description: Test exporting all triples to Targets in multiple Object Maps.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
rml:logicalTarget <#TargetDump1>;
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
rml:logicalTarget <#TargetDump2>;
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
Title: Multiple Targets: Multiple Graph Maps
Description: Test exporting all triples to Targets in multiple Graph Maps.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dcat: <http://www.w3.org/ns/dcat#> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@prefix ex: <http://example.org/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:graphMap [ a rml:GraphMap;
rml:constant ex:PeopleGraph1;
rml:logicalTarget <#TargetDump1>;
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
rml:graphMap [ a rml:GraphMap;
rml:constant ex:PeopleGraph1;
rml:logicalTarget <#TargetDump1>;
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" <http://example.org/PeopleGraph1>.
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph1> .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" <http://example.org/PeopleGraph1> .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph1> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" <http://example.org/PeopleGraph1> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph1> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" <http://example.org/PeopleGraph1> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph1> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" <http://example.org/PeopleGraph1> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph1> .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" <http://example.org/PeopleGraph2> .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" <http://example.org/PeopleGraph2> .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" <http://example.org/PeopleGraph2> .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" <http://example.org/PeopleGraph2> .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" <http://example.org/PeopleGraph2> .
Title: Multiple Targets: Multiple Language Maps
Description: Test exporting all triples to Targets in multiple Language Maps.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
rml:languageMap [ a rml:LanguageMap;
rml:constant "en";
rml:logicalTarget <#TargetDump1>;
];
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
rml:languageMap [ a rml:LanguageMap;
rml:constant "nl";
rml:logicalTarget <#TargetDump2>;
];
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@en .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@en .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@en .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@en .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@en .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller"@nl .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green"@nl .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani"@nl .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing"@nl .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller"@nl .
Title: Multiple Targets: Multiple Datatype Maps
Description: Test exporting all triples to Targets in multiple Datatype Maps.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
rml:datatypeMap [ a rml:DatatypeMap;
rml:constant xsd:integer;
rml:logicalTarget <#TargetDump1>;
];
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
rml:datatypeMap [ a rml:DatatypeMap;
rml:constant xsd:double;
rml:logicalTarget <#TargetDump2>;
];
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#integer>.
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#integer>.
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#integer>.
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#integer>.
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#integer>.
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33"^^<http://www.w3.org/2001/XMLSchema#double>.
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34"^^<http://www.w3.org/2001/XMLSchema#double>.
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#double>.
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36"^^<http://www.w3.org/2001/XMLSchema#double>.
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37"^^<http://www.w3.org/2001/XMLSchema#double>.
Title: Multiple Targets: Multiple Term Maps with same Target
Description: Test exporting all triples to same Target in multiple Term Maps.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
rml:logicalTarget <#TargetDump1>;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
rml:logicalTarget <#TargetDump1>;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33".
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34".
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35".
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36".
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37".
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
Title: Overriding Targets: Seperate Triples Map
Description: Test exporting some triples to a different Target with a separate Triples Map.
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump2>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TriplesMap2> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
<#TargetDump2> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump2.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Output 3
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
Title: Target JSON-LD
Description: Test export all triples as JSON-LD
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.jsonld";
];
rml:serialization formats:JSON-LD;
.
Output 1
Output 2
{
"@context": {
"foaf": "http://xmlns.com/foaf/0.1/"
},
"@graph": [
{
"@id": "http://example.org/0",
"foaf:name": "Monica Geller",
"foaf:age": "33"
},
{
"@id": "http://example.org/1",
"foaf:name": "Rachel Green",
"foaf:age": "34"
},
{
"@id": "http://example.org/2",
"foaf:name": "Joey Tribbiani",
"foaf:age": "35"
},
{
"@id": "http://example.org/3",
"foaf:name": "Chandler Bing",
"foaf:age": "36"
},
{
"@id": "http://example.org/4",
"foaf:name": "Ross Geller",
"foaf:age": "37"
}
]
}
Title: Target N3
Description: Test export all triples as N3
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.n3";
];
rml:serialization formats:N3;
.
Output 1
Output 2
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.org/> .
ex:0 <foaf:age> "33" ;
<foaf:name> "Monica Geller" .
ex:1 <foaf:age> "34" ;
<foaf:name> "Rachel Green" .
ex:2 <foaf:age> "35" ;
<foaf:name> "Joey Tribbiani" .
ex:3 <foaf:age> "36" ;
<foaf:name> "Chandler Bing" .
ex:4 <foaf:age> "37" ;
<foaf:name> "Ross Geller" .
Title: Target N-Triples
Description: Test export all triples as N-Triples
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nt";
];
rml:serialization formats:N-Triples;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Target N-Quads
Description: Test export all triples as N-Quads
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Target RDF/JSON
Description: Test export all triples as RDF/JSON
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.rdfjson";
];
rml:serialization formats:RDF_JSON;
.
Output 1
Output 2
{
"http://example.org/0" : {
"http://xmlns.com/foaf/0.1/age" : [ { "value" : "33" } ],
"http://xmlns.com/foaf/0.1/name" : [ { "value" : "Monica Geller" } ]
},
"http://example.org/1" : {
"http://xmlns.com/foaf/0.1/age" : [ { "value" : "34" } ],
"http://xmlns.com/foaf/0.1/name" : [ { "value" : "Rachel Green" } ]
},
"http://example.org/2" : {
"http://xmlns.com/foaf/0.1/age" : [ { "value" : "35" } ],
"http://xmlns.com/foaf/0.1/name" : [ { "value" : "Joey Tribbiani" } ]
},
"http://example.org/3" : {
"http://xmlns.com/foaf/0.1/age" : [ { "value" : "36" } ],
"http://xmlns.com/foaf/0.1/name" : [ { "value" : "Chandler Bing" } ]
},
"http://example.org/4" : {
"http://xmlns.com/foaf/0.1/age" : [ { "value" : "37" } ],
"http://xmlns.com/foaf/0.1/name" : [ { "value" : "Ross Geller" } ]
}
}
Title: Target RDF/XML
Description: Test export all triples as RDF/XML
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:RDF_XML;
.
Output 1
Output 2
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
<rdf:Description rdf:about="http://example.org/0">
<foaf:age>33</foaf:age>
<foaf:name>Monica Geller</foaf:name>
</rdf:Description>
<rdf:Description rdf:about="http://example.org/1">
<foaf:age>34</foaf:age>
<foaf:name>Rachel Green</foaf:name>
</rdf:Description>
<rdf:Description rdf:about="http://example.org/2">
<foaf:age>35</foaf:age>
<foaf:name>Joey Tribbiani</foaf:name>
</rdf:Description>
<rdf:Description rdf:about="http://example.org/3">
<foaf:age>36</foaf:age>
<foaf:name>Chandler Bing</foaf:name>
</rdf:Description>
<rdf:Description rdf:about="http://example.org/4">
<foaf:age>37</foaf:age>
<foaf:name>Ross Geller</foaf:name>
</rdf:Description>
</rdf:RDF>
Title: Target Turtle
Description: Test export all triples as Turtle
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:Turtle;
.
Output 1
Output 2
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ex: <http://example.org/> .
<ex:0> <foaf:age> "33" .
<ex:0> <foaf:name> "Monica Geller" .
<ex:1> <foaf:age> "34" .
<ex:1> <foaf:name> "Rachel Green" .
<ex:2> <foaf:age> "35" .
<ex:2> <foaf:name> "Joey Tribbiani" .
<ex:3> <foaf:age> "36" .
<ex:3> <foaf:name> "Chandler Bing" .
<ex:4> <foaf:age> "37" .
<ex:4> <foaf:name> "Ross Geller" .
Title: Target UTF-8
Description: Test export all triples with UTF-8 encoding
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
rml:encoding rml:UTF-8;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Target UTF-16
Description: Test export all triples with UTF-16 encoding
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
rml:encoding rml:UTF-16;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Target no compression
Description: Test export all triples with no compression
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .
Title: Target GZip compression
Description: Test export all triples with GZip compression
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq.gz";
];
rml:serialization formats:N-Quads;
rml:compression rml:gzip;
.
Output 1
Output 2
dump1.nq.gz
Title: Target Zip compression
Description: Test export all triples with ZIP compression
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq.zip";
];
rml:serialization formats:N-Quads;
rml:compression rml:zip;
.
Output 1
Output 2
dump1.nq.zip
Title: Target TarXz compression
Description: Test export all triples with TarXZ compression
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@prefix ex: <http://example.org/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq.tar.xz";
];
rml:serialization formats:N-Quads;
rml:compression rml:tarxz;
.
Output 1
Output 2
dump1.nq.tar.xz
Title: Target TarGzip compression
Description: Test export all triples with TarGZip compression
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq.tar.gz";
];
rml:serialization formats:N-Quads;
rml:compression rml:targz;
.
Output 1
Output 2
dump1.nq.tar.gz
Title: Target with FilePath description
Description: Test export all triples to a target with File path access description
Error expected? No
Input
[
{
"id": 0,
"name": "Monica Geller",
"age": 33
},
{
"id": 1,
"name": "Rachel Green",
"age": 34
},
{
"id": 2,
"name": "Joey Tribbiani",
"age": 35
},
{
"id": 3,
"name": "Chandler Bing",
"age": 36
},
{
"id": 4,
"name": "Ross Geller",
"age": 37
}
]
Mapping
@prefix rml: <http://w3id.org/rml/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@base <http://example.com/rules/> .
<#TriplesMap> a rml:TriplesMap;
rml:logicalSource [ a rml:LogicalSource;
rml:source [ a rml:FilePath;
rml:root rml:MappingDirectory;
rml:path "Friends.json";
];
rml:referenceFormulation rml:JSONPath;
rml:iterator "$[*]";
];
rml:subjectMap [ a rml:SubjectMap;
rml:template "http://example.org/{$.id}";
rml:logicalTarget <#TargetDump1>;
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:name;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.name";
];
];
rml:predicateObjectMap [ a rml:PredicateObjectMap;
rml:predicateMap [ a rml:PredicateMap;
rml:constant foaf:age;
];
rml:objectMap [ a rml:ObjectMap;
rml:reference "$.age";
];
];
.
<#TargetDump1> a rml:LogicalTarget;
rml:target [ a rml:Target, rml:FilePath;
rml:root rml:CurrentWorkingDirectory;
rml:path "./dump1.nq";
];
rml:serialization formats:N-Quads;
.
Output 1
Output 2
<http://example.org/0> <http://xmlns.com/foaf/0.1/age> "33" .
<http://example.org/0> <http://xmlns.com/foaf/0.1/name> "Monica Geller" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/age> "34" .
<http://example.org/1> <http://xmlns.com/foaf/0.1/name> "Rachel Green" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/age> "35" .
<http://example.org/2> <http://xmlns.com/foaf/0.1/name> "Joey Tribbiani" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/age> "36" .
<http://example.org/3> <http://xmlns.com/foaf/0.1/name> "Chandler Bing" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/age> "37" .
<http://example.org/4> <http://xmlns.com/foaf/0.1/name> "Ross Geller" .