Mapping Hierarchical Sources into
RDF using the RML Mapping Language
Anastasia Dimou1, Miel Vander Sande1,
Jason Slepicka2, Pedro Szekely2,
Erik Mannens1, Craig Knoblock2, Rik Van de Walle1
1Ghent University – iMinds – Multimedia Lab
2University of Southern California – Information Science Institute –
Department of Computer Science
http://rml.io
IEEE-ICSC14
Newport beach, California, 18th June 2014
Most of the data that we would like to
be able to query as Linked Open Data
exists in formats other than RDF
There are…
over 11,000 APIs according to
ProgrammableWeb.org
only 74 of which return results in RDF
But more than 5000
return results in JSON or XML
Many
languages, tools and approaches
were proposed
to convert data
from relational databases to RDF
Relational Database to RDF (R2RML W3C)
R2RML mappings R2RML processor
Data OWNER / PUBLISHER
defines
RDF
DB
Mapping Hierarchical Sources into RDF using the RML Mapping Language
R2RML mappings R2RML processor
Data OWNER / PUBLISHER
defines
RDF
DB CSV JSONXML
RDF RDF RDF
lack of uniform definitions
to describe mapping rules for heterogeneous sources
lack of interoperable definitions
that would allow the re-use of mapping rules
across different implementations
lack of reusable definitions
that would allow the re-use of mapping rules
for representing data in the same or different formats
mapping data
on a per-source and per-format basis
or on case-specific basis
Uniform way of defining mappings
for heterogeneous sources
that can be re-used across data
in the same or different formats
and be interoperable
across different implementations
R2RML mappings R2RML processor
Data OWNER / PUBLISHER
defines
RDF
DB CSV JSONXML
RDF RDF RDF
Mappings definitions processor
Data OWNER / PUBLISHER
defines
RDF
DB CSV JSONXML
any format to RDF
RDF Mapping Language (RML)
generic scalable mapping language
for mapping heterogeneous resources into RDF
in an integrable and interoperable fashion
superset of the W3C standardized
R2RML mapping language
http://semweb.mmlab.be/ns/rml
Relational Database to RDF
Mapping Language
(R2RML)
R2RML mapping document
NAME BIRTH_DATE DEATH_DATE
Robert Theodore McCall 1919-12-23 2010-02-26
Ronald Anderson 1929-12-06
Triples Map
Logical Table
Table Name
<#ArtistMapping>
rr:logicalTable
[
rr:tableName “ARTISTS”
].
R2RML mapping definition
Table Name
Triples
Map
Logical Table
Subject Map
Predicate-Object Map
Predicate-Object Map
Predicate-Object Map
Predicate Map
Object Map
R2RML mapping document
Triples Map
Subject Map
NAME BIRTH_DATE DEATH_DATE
Robert Theodore McCall 1919-12-23 2010-02-26
Ronald Anderson 1929-12-06
<#ArtistMapping>
rr:subjectMap [
rr:template “http://ex.com/{NAME}” ;
rr:class ex:Person ];
<http://ex.com/Robert+Theodore+McCall> a ex:Person
R2RML mapping document
Predicate Map
NAME BIRTH_DATE DEATH_DATE
Robert Theodore McCall 1919-12-23 2010-02-26
Ronald Anderson 1929-12-06
<#ArtistMapping>
rr:predicateObjectMap [
rr:predicate ex:birth_date;
rr:objectMap [
rr:column "BIRTH_DATE" ] ];
<http://ex.com/Robert+Theodore+McCall> ex:birth_date “1919-12-23”
Predicate Object Map
Objectt Map
RDF Mapping Language
(RML)
RDF Mapping Language (RML)
mapping hierarchical sources to RDF
deal with hierarchy and heterogeneity
R2RML: each row is a self-contained
that can be processed independently
R2RML: the columns in each row
can be referred to unambiguously
R2RML: for each reference to a column in a single row
a unique value is returned
explicit reference to the iteration pattern
R2RML: each row is a self-contained
that can be processed independently
abstract reference to the input data
R2RML: the columns in each row
can be referred to unambiguously
more than one triples per Predicate-Object Map
R2RML: for each reference to a column in a single row
a unique value is returned
RDF Mapping Language
(RML)
For hierarchical sources
[ ... …
{ "Title": "Apollo 11 Crew",
"Artist": "Ronald Anderson",
"Ref": "NPG_70_36",
"Sitter": [
{ "Name": "Neil Armstrong",
"Birth Date": "1930-08-05" },
{ "Name": "Buzz Aldrin",
"Birth Date": "1930-01-20" },
{ "Name": "Michael Collins" } ],
"DateOfWork": "1969" },
{ "Title": "Neil Armstrong",
"Artist": "Robert Theodore McCall",
"Ref": "S_NPG_2010_51",
"Sitter": [
{ "Name": "Neil Armstrong" } ],
"DateOfWork": "2009" },
... … ]
<Artists> ... ...
<Artist>
<Name>Robert Theodore McCall</Name>
<Birth_Date>1919-12-23</Birth_Date>
<Death_Date>2010-02-26</Death_Date>
</Artist>
<Artist>
<Name>Ronald Anderson</Name>
<Birth_Date>1929-12-06</Birth_Date>
<Death_Date/>
</Artist> ... ...
</Artists>
artworks.JSON artists.XML
Specifying the input data
R2RML: database
RML: file, API, …
R2RML: Logical Table (rr:logicalTable)
RML: Logical Source (rml:logicalSource)
R2RML: logical Name (rr:logicalName)
RML: source (rml:source)
Triples Map
Logical Source
source
<#ArtworkMapping>
rml:logicalSource
[rml:source “http://ex.com/artworks.json”].
Triples Map
Logical Source
source
<#ArtistMapping>
rml:logicalSource
[ rml:source “artists.xml” ].
Referring to the input data
R2RML: databases
RML: XML or JSON or CSV or ….
R2RML: (SQL)
RML: Xpath/Xquery or JSONPath or RFC 4180 or …
R2RML: (rr:sqlQuery)
RML: rml:referenceFormulation
<#ArtworkMapping>
rml:logicalSource
[ rml:source “http://ex.com/artworks.json” ;
rml:rererenceFormulation ql:JSONPath ].
Triples Map
Logical Source
source
<#ArtistMapping>
rml:logicalSource
[ rml:source “artists.xml”;
rml:referenceFormulation ql:XPath ].Reference Formulation
Triples Map
Logical Source
source
Reference Formulation
Iterating over the input data
R2RML: per row
RML: ?
R2RML:
RML: rml:iterator
<#ArtistMapping>
rml:logicalSource
[ rml:source “artists.xml”;
rml:referenceFormulation ql:Xpath ;
rml:iterator “/Artists/Artist” ].
<Artists> ... ...
<Artist>
<Name>Robert Theodore McCall</Name>
<Birth_Date>1919-12-23</Birth_Date>
<Death_Date>2010-02-26</Death_Date>
</Artist>
<Artist>
<Name>Ronald Anderson</Name>
<Birth_Date>1929-12-06</Birth_Date>
<Death_Date/>
</Artist> ... ...
</Artists>
[ ... …
{ "Title": "Apollo 11 Crew",
"Artist": "Ronald Anderson",
"Ref": "NPG_70_36",
"Sitter": [
{ "Name": "Neil Armstrong",
"Birth Date": "1930-08-05" },
{ "Name": "Buzz Aldrin",
"Birth Date": "1930-01-20" },
{ "Name": "Michael Collins" } ],
"DateOfWork": "1969" },
{ "Title": "Neil Armstrong",
"Artist": "Robert Theodore McCall",
"Ref": "S_NPG_2010_51",
"Sitter": [
{ "Name": "Neil Armstrong" } ],
"DateOfWork": "2009" },
... … ]
<#ArtworkMapping>
rml:logicalSource
[ rml:source “http://ex.com/artworks.json” ;
rml:rererenceFormulation ql:JSONPath ;
rml:iterator “$.[*]” ].
<#SitterMapping>
rml:logicalSource
[ rml:source “http://ex.com/artworks.json”;
rml:rererenceFormulation ql:JSONPath ;
rml:iterator “$.[*].Sitter” ].
Referring to the extracts of the input data
explicitly and implicitly
R2RML: column name
RML: XML element or JSON object or …
R2RML: rr:column
RML: rml:reference
<#ArtistMapping>
rml:logicalSource
[ rml:source “http://ex.com/artists.xml”;
rml:rererenceFormulation ql:XPath ;
rml:iterator “/Artists/Artist” ] ;
rr:subjectMap [
rr:template
“http://ex.com/{Name}”
];
rr:predicateObjectMap [
rr:predicate ex:death_date ;
rr:objectMap [
rml:reference
“/Artists/Artist/Death_Date”] ].
<Artists> ... ...
<Artist>
<Name>Robert Theodore McCall</Name>
<Birth_Date>1919-12-23</Birth_Date>
<Death_Date>2010-02-26</Death_Date>
</Artist>
<Artist>
<Name>Ronald Anderson</Name>
<Birth_Date>1929-12-06</Birth_Date>
<Death_Date/>
</Artist> ... ...
</Artists>
<http://ex.com/Robert+Theodore+McCall>
ex:death_date “1929-12-06”.
[ ... …
{ "Title": "Apollo 11 Crew",
"Artist": "Ronald Anderson",
"Ref": "NPG_70_36",
"Sitter": [
{ "Name": "Neil Armstrong",
"Birth Date": "1930-08-05" },
{ "Name": "Buzz Aldrin",
"Birth Date": "1930-01-20" },
{ "Name": "Michael Collins" } ],
"DateOfWork": "1969" },
{ "Title": "Neil Armstrong",
"Artist": "Robert Theodore McCall",
"Ref": "S_NPG_2010_51",
"Sitter": [
{ "Name": "Neil Armstrong" } ],
"DateOfWork": "2009" },
... … ]
<#ArtworkMapping>
rml:logicalSource
[ rml:source “http://ex.com/artworks.json”;
rml:rererenceFormulation ql:JSONPath ;
rml:iterator “$.[*]” ] ;
rr:subjectMap [
rr:template
“http://ex.com/{Ref}”];
rr:predicateObjectMap [
rr:predicate rdfs:label ;
rr:objectMap [
rml:reference “$.[*].Title” ]
].
<http://ex.com/NPG_70_36>
rdfs:label “Apollo 11 Crew”.
[ ... …
{ "Title": "Apollo 11 Crew",
"Artist": "Ronald Anderson",
"Ref": "NPG_70_36",
"Sitter": [
{ "Name": "Neil Armstrong",
"Birth Date": "1930-08-05" },
{ "Name": "Buzz Aldrin",
"Birth Date": "1930-01-20" },
{ "Name": "Michael Collins" } ],
"DateOfWork": "1969" },
{ "Title": "Neil Armstrong",
"Artist": "Robert Theodore McCall",
"Ref": "S_NPG_2010_51",
"Sitter": [
{ "Name": "Neil Armstrong" } ],
"DateOfWork": "2009" },
... … ]
<#SitterMapping>
rml:logicalSource
[ rml:source “http://ex.com/artworks.json”;
rml:rererenceFormulation ql:JSONPath ;
rml:iterator “$.[*].Sitter” ] ;
rr:subjectMap [
rr:template
“http://ex.com/{Name}”];
rr:predicateObjectMap [
rr:predicate ex:birth_date ;
rr:objectMap [
rml:reference “$.[*].Sitter.Birth Date” ]].
<http://ex.com/Neil+Armstrong>
ex:birth_date “1930-08-05”.
RDF Mapping Language (RML)
Source
Triples Map
Logical Source
Subject Map
Predicate-Object
Map
Predicate
Map
Object Map
Term
Map
template
constant
reference
Iterator
Reference
Formulation
Referencing
Object Map
Triples
Map
Join
Condition
Parent
column
Child
column
RDF Mapping Language
(RML)
Editing mappings with Karma
http://www.isi.edu/integration/karma/
Mapping Hierarchical Sources into RDF using the RML Mapping Language
RDF Mapping Language
(RML)
Processing
mapping-driven processing:
processing driven by the mapping module
data-driven processing:
processing driven by the extraction module
Extraction Module Mapping Module
RML Processor
Mapping Hierarchical Sources into RDF
using the RML mapping language
RML: http://rml.io
RML Namespace: http://semweb.mmlab.be/ns/rml
RML Processor: https://github.com/mmlab/RMLProcessor
Contact us
Anastasia Dimou anastasia.dimou@ugent.be @natadimou
Miel Vander Sande miel.vandersande@ugent.be @Miel_vds

More Related Content

PPTX
PySpark dataframe
PPTX
SHACL by example
PPTX
Introduction to Rust language programming
PDF
Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...
PPTX
SHACL: Shaping the Big Ball of Data Mud
PDF
Spark SQL
PPTX
Spark Summit East 2017: Apache spark and object stores
PPTX
Spark rdd vs data frame vs dataset
PySpark dataframe
SHACL by example
Introduction to Rust language programming
Pyspark Tutorial | Introduction to Apache Spark with Python | PySpark Trainin...
SHACL: Shaping the Big Ball of Data Mud
Spark SQL
Spark Summit East 2017: Apache spark and object stores
Spark rdd vs data frame vs dataset

What's hot (20)

PPT
Graph database
PPTX
Lecture 2_ Intro to laravel.pptx
PPTX
ORC improvement in Apache Spark 2.3
PPTX
NAMED ENTITY RECOGNITION
PDF
Word Embeddings - Introduction
PPT
RDFS In A Nutshell V1
PDF
Apache Spark - Basics of RDD | Big Data Hadoop Spark Tutorial | CloudxLab
PDF
Linking the world with Python and Semantics
PPTX
Hadoop 2 cluster architecture
PDF
Seq2Seq (encoder decoder) model
PDF
The Gremlin Graph Traversal Language
PPTX
PPTX
Relational Database to RDF (RDB2RDF)
PPTX
Apache Spark Fundamentals
PPTX
ORC File - Optimizing Your Big Data
PPTX
Apache Hive Tutorial
PDF
Ontologies and semantic web
PPTX
What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...
PDF
Eclipse RDF4J - Working with RDF in Java
PDF
PySpark Training | PySpark Tutorial for Beginners | Apache Spark with Python ...
Graph database
Lecture 2_ Intro to laravel.pptx
ORC improvement in Apache Spark 2.3
NAMED ENTITY RECOGNITION
Word Embeddings - Introduction
RDFS In A Nutshell V1
Apache Spark - Basics of RDD | Big Data Hadoop Spark Tutorial | CloudxLab
Linking the world with Python and Semantics
Hadoop 2 cluster architecture
Seq2Seq (encoder decoder) model
The Gremlin Graph Traversal Language
Relational Database to RDF (RDB2RDF)
Apache Spark Fundamentals
ORC File - Optimizing Your Big Data
Apache Hive Tutorial
Ontologies and semantic web
What Is Apache Spark? | Introduction To Apache Spark | Apache Spark Tutorial ...
Eclipse RDF4J - Working with RDF in Java
PySpark Training | PySpark Tutorial for Beginners | Apache Spark with Python ...
Ad

Similar to Mapping Hierarchical Sources into RDF using the RML Mapping Language (20)

PDF
Machine-Interpretable Dataset and Service Descriptions for Heterogeneous Data...
PDF
Translation of Relational and Non-Relational Databases into RDF with xR2RML
PDF
A Generic Language for Integrated RDF Mappings of Heterogeneous Data
PDF
Do it on your own - From 3 to 5 Star Linked Open Data with RMLio
PPTX
Incremental Export of Relational Database Contents into RDF Graphs
PDF
Culture Geeks Feb talk: Adventures in Linked Data Land
PPTX
Transient and persistent RDF views over relational databases in the context o...
PPTX
MW2014 Workshop - Intro to Linked Open Data
PDF
Karma is a tool! Managing your Data
PDF
Adventures in Linked Data Land (presentation by Richard Light)
PPT
Publishing data on the Semantic Web
KEY
It's not rocket surgery - Linked In: ALA 2011
PDF
Assessing and Refining Mappings to RDF to Improve Dataset Quality
PPT
Using Semantic Web Technologies to Facilitate XBRL-based Financial Data Compa...
PPTX
SWT Lecture Session 10 R2RML Part 1
ZIP
SemWeb Fundamentals - Info Linking & Layering in Practice
PPTX
Semantic Web and Related Work at W3C
KEY
Semantic web application architecture
PDF
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
PDF
Data translation with SPARQL 1.1
Machine-Interpretable Dataset and Service Descriptions for Heterogeneous Data...
Translation of Relational and Non-Relational Databases into RDF with xR2RML
A Generic Language for Integrated RDF Mappings of Heterogeneous Data
Do it on your own - From 3 to 5 Star Linked Open Data with RMLio
Incremental Export of Relational Database Contents into RDF Graphs
Culture Geeks Feb talk: Adventures in Linked Data Land
Transient and persistent RDF views over relational databases in the context o...
MW2014 Workshop - Intro to Linked Open Data
Karma is a tool! Managing your Data
Adventures in Linked Data Land (presentation by Richard Light)
Publishing data on the Semantic Web
It's not rocket surgery - Linked In: ALA 2011
Assessing and Refining Mappings to RDF to Improve Dataset Quality
Using Semantic Web Technologies to Facilitate XBRL-based Financial Data Compa...
SWT Lecture Session 10 R2RML Part 1
SemWeb Fundamentals - Info Linking & Layering in Practice
Semantic Web and Related Work at W3C
Semantic web application architecture
A Generic Mapping-based Query Translation from SPARQL to Various Target Datab...
Data translation with SPARQL 1.1
Ad

More from andimou (9)

PDF
What Factors Influence the Design of a Linked Data Generation Algorithm?
PDF
High quality Linked Data generation for librarians
PDF
iLastic: Linked Data Generation Workflow and User Interface for iMinds Schola...
PDF
DBpedia Mappings Quality Assessment
PDF
Towards an Interface for User-Friendly Linked Data Generation Administration
PDF
Mappings Validation
PDF
Test-driven Assessment of [R2]RML Mappings to Improve Dataset Quality
PDF
Extraction and Semantic Annotation of Workshop Proceedings in HTML using RML
PPTX
Visualizing the information of a Linked Open Data enabled Research Informatio...
What Factors Influence the Design of a Linked Data Generation Algorithm?
High quality Linked Data generation for librarians
iLastic: Linked Data Generation Workflow and User Interface for iMinds Schola...
DBpedia Mappings Quality Assessment
Towards an Interface for User-Friendly Linked Data Generation Administration
Mappings Validation
Test-driven Assessment of [R2]RML Mappings to Improve Dataset Quality
Extraction and Semantic Annotation of Workshop Proceedings in HTML using RML
Visualizing the information of a Linked Open Data enabled Research Informatio...

Recently uploaded (20)

PPTX
Microsoft User Copilot Training Slide Deck
PPTX
Internet of Everything -Basic concepts details
PDF
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
EIS-Webinar-Regulated-Industries-2025-08.pdf
PPTX
agenticai-neweraofintelligence-250529192801-1b5e6870.pptx
PDF
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
PDF
Introduction to MCP and A2A Protocols: Enabling Agent Communication
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PDF
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
PDF
Electrocardiogram sequences data analytics and classification using unsupervi...
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
“The Future of Visual AI: Efficient Multimodal Intelligence,” a Keynote Prese...
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
Microsoft User Copilot Training Slide Deck
Internet of Everything -Basic concepts details
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
EIS-Webinar-Regulated-Industries-2025-08.pdf
agenticai-neweraofintelligence-250529192801-1b5e6870.pptx
INTERSPEECH 2025 「Recent Advances and Future Directions in Voice Conversion」
Introduction to MCP and A2A Protocols: Enabling Agent Communication
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
AI.gov: A Trojan Horse in the Age of Artificial Intelligence
Electrocardiogram sequences data analytics and classification using unsupervi...
Early detection and classification of bone marrow changes in lumbar vertebrae...
giants, standing on the shoulders of - by Daniel Stenberg
“The Future of Visual AI: Efficient Multimodal Intelligence,” a Keynote Prese...
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
MuleSoft-Compete-Deck for midddleware integrations
Improvisation in detection of pomegranate leaf disease using transfer learni...
Basics of Cloud Computing - Cloud Ecosystem
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
Lung cancer patients survival prediction using outlier detection and optimize...

Mapping Hierarchical Sources into RDF using the RML Mapping Language

  • 1. Mapping Hierarchical Sources into RDF using the RML Mapping Language Anastasia Dimou1, Miel Vander Sande1, Jason Slepicka2, Pedro Szekely2, Erik Mannens1, Craig Knoblock2, Rik Van de Walle1 1Ghent University – iMinds – Multimedia Lab 2University of Southern California – Information Science Institute – Department of Computer Science http://rml.io IEEE-ICSC14 Newport beach, California, 18th June 2014
  • 2. Most of the data that we would like to be able to query as Linked Open Data exists in formats other than RDF
  • 3. There are… over 11,000 APIs according to ProgrammableWeb.org only 74 of which return results in RDF But more than 5000 return results in JSON or XML
  • 4. Many languages, tools and approaches were proposed to convert data from relational databases to RDF
  • 5. Relational Database to RDF (R2RML W3C) R2RML mappings R2RML processor Data OWNER / PUBLISHER defines RDF DB
  • 7. R2RML mappings R2RML processor Data OWNER / PUBLISHER defines RDF DB CSV JSONXML RDF RDF RDF
  • 8. lack of uniform definitions to describe mapping rules for heterogeneous sources lack of interoperable definitions that would allow the re-use of mapping rules across different implementations lack of reusable definitions that would allow the re-use of mapping rules for representing data in the same or different formats
  • 9. mapping data on a per-source and per-format basis or on case-specific basis Uniform way of defining mappings for heterogeneous sources that can be re-used across data in the same or different formats and be interoperable across different implementations
  • 10. R2RML mappings R2RML processor Data OWNER / PUBLISHER defines RDF DB CSV JSONXML RDF RDF RDF
  • 11. Mappings definitions processor Data OWNER / PUBLISHER defines RDF DB CSV JSONXML any format to RDF
  • 12. RDF Mapping Language (RML) generic scalable mapping language for mapping heterogeneous resources into RDF in an integrable and interoperable fashion superset of the W3C standardized R2RML mapping language http://semweb.mmlab.be/ns/rml
  • 13. Relational Database to RDF Mapping Language (R2RML)
  • 14. R2RML mapping document NAME BIRTH_DATE DEATH_DATE Robert Theodore McCall 1919-12-23 2010-02-26 Ronald Anderson 1929-12-06 Triples Map Logical Table Table Name <#ArtistMapping> rr:logicalTable [ rr:tableName “ARTISTS” ].
  • 15. R2RML mapping definition Table Name Triples Map Logical Table Subject Map Predicate-Object Map Predicate-Object Map Predicate-Object Map Predicate Map Object Map
  • 16. R2RML mapping document Triples Map Subject Map NAME BIRTH_DATE DEATH_DATE Robert Theodore McCall 1919-12-23 2010-02-26 Ronald Anderson 1929-12-06 <#ArtistMapping> rr:subjectMap [ rr:template “http://ex.com/{NAME}” ; rr:class ex:Person ]; <http://ex.com/Robert+Theodore+McCall> a ex:Person
  • 17. R2RML mapping document Predicate Map NAME BIRTH_DATE DEATH_DATE Robert Theodore McCall 1919-12-23 2010-02-26 Ronald Anderson 1929-12-06 <#ArtistMapping> rr:predicateObjectMap [ rr:predicate ex:birth_date; rr:objectMap [ rr:column "BIRTH_DATE" ] ]; <http://ex.com/Robert+Theodore+McCall> ex:birth_date “1919-12-23” Predicate Object Map Objectt Map
  • 19. RDF Mapping Language (RML) mapping hierarchical sources to RDF deal with hierarchy and heterogeneity
  • 20. R2RML: each row is a self-contained that can be processed independently R2RML: the columns in each row can be referred to unambiguously R2RML: for each reference to a column in a single row a unique value is returned
  • 21. explicit reference to the iteration pattern R2RML: each row is a self-contained that can be processed independently abstract reference to the input data R2RML: the columns in each row can be referred to unambiguously more than one triples per Predicate-Object Map R2RML: for each reference to a column in a single row a unique value is returned
  • 22. RDF Mapping Language (RML) For hierarchical sources
  • 23. [ ... … { "Title": "Apollo 11 Crew", "Artist": "Ronald Anderson", "Ref": "NPG_70_36", "Sitter": [ { "Name": "Neil Armstrong", "Birth Date": "1930-08-05" }, { "Name": "Buzz Aldrin", "Birth Date": "1930-01-20" }, { "Name": "Michael Collins" } ], "DateOfWork": "1969" }, { "Title": "Neil Armstrong", "Artist": "Robert Theodore McCall", "Ref": "S_NPG_2010_51", "Sitter": [ { "Name": "Neil Armstrong" } ], "DateOfWork": "2009" }, ... … ] <Artists> ... ... <Artist> <Name>Robert Theodore McCall</Name> <Birth_Date>1919-12-23</Birth_Date> <Death_Date>2010-02-26</Death_Date> </Artist> <Artist> <Name>Ronald Anderson</Name> <Birth_Date>1929-12-06</Birth_Date> <Death_Date/> </Artist> ... ... </Artists> artworks.JSON artists.XML
  • 24. Specifying the input data R2RML: database RML: file, API, … R2RML: Logical Table (rr:logicalTable) RML: Logical Source (rml:logicalSource) R2RML: logical Name (rr:logicalName) RML: source (rml:source)
  • 25. Triples Map Logical Source source <#ArtworkMapping> rml:logicalSource [rml:source “http://ex.com/artworks.json”]. Triples Map Logical Source source <#ArtistMapping> rml:logicalSource [ rml:source “artists.xml” ].
  • 26. Referring to the input data R2RML: databases RML: XML or JSON or CSV or …. R2RML: (SQL) RML: Xpath/Xquery or JSONPath or RFC 4180 or … R2RML: (rr:sqlQuery) RML: rml:referenceFormulation
  • 27. <#ArtworkMapping> rml:logicalSource [ rml:source “http://ex.com/artworks.json” ; rml:rererenceFormulation ql:JSONPath ]. Triples Map Logical Source source <#ArtistMapping> rml:logicalSource [ rml:source “artists.xml”; rml:referenceFormulation ql:XPath ].Reference Formulation Triples Map Logical Source source Reference Formulation
  • 28. Iterating over the input data R2RML: per row RML: ? R2RML: RML: rml:iterator
  • 29. <#ArtistMapping> rml:logicalSource [ rml:source “artists.xml”; rml:referenceFormulation ql:Xpath ; rml:iterator “/Artists/Artist” ]. <Artists> ... ... <Artist> <Name>Robert Theodore McCall</Name> <Birth_Date>1919-12-23</Birth_Date> <Death_Date>2010-02-26</Death_Date> </Artist> <Artist> <Name>Ronald Anderson</Name> <Birth_Date>1929-12-06</Birth_Date> <Death_Date/> </Artist> ... ... </Artists>
  • 30. [ ... … { "Title": "Apollo 11 Crew", "Artist": "Ronald Anderson", "Ref": "NPG_70_36", "Sitter": [ { "Name": "Neil Armstrong", "Birth Date": "1930-08-05" }, { "Name": "Buzz Aldrin", "Birth Date": "1930-01-20" }, { "Name": "Michael Collins" } ], "DateOfWork": "1969" }, { "Title": "Neil Armstrong", "Artist": "Robert Theodore McCall", "Ref": "S_NPG_2010_51", "Sitter": [ { "Name": "Neil Armstrong" } ], "DateOfWork": "2009" }, ... … ] <#ArtworkMapping> rml:logicalSource [ rml:source “http://ex.com/artworks.json” ; rml:rererenceFormulation ql:JSONPath ; rml:iterator “$.[*]” ]. <#SitterMapping> rml:logicalSource [ rml:source “http://ex.com/artworks.json”; rml:rererenceFormulation ql:JSONPath ; rml:iterator “$.[*].Sitter” ].
  • 31. Referring to the extracts of the input data explicitly and implicitly R2RML: column name RML: XML element or JSON object or … R2RML: rr:column RML: rml:reference
  • 32. <#ArtistMapping> rml:logicalSource [ rml:source “http://ex.com/artists.xml”; rml:rererenceFormulation ql:XPath ; rml:iterator “/Artists/Artist” ] ; rr:subjectMap [ rr:template “http://ex.com/{Name}” ]; rr:predicateObjectMap [ rr:predicate ex:death_date ; rr:objectMap [ rml:reference “/Artists/Artist/Death_Date”] ]. <Artists> ... ... <Artist> <Name>Robert Theodore McCall</Name> <Birth_Date>1919-12-23</Birth_Date> <Death_Date>2010-02-26</Death_Date> </Artist> <Artist> <Name>Ronald Anderson</Name> <Birth_Date>1929-12-06</Birth_Date> <Death_Date/> </Artist> ... ... </Artists> <http://ex.com/Robert+Theodore+McCall> ex:death_date “1929-12-06”.
  • 33. [ ... … { "Title": "Apollo 11 Crew", "Artist": "Ronald Anderson", "Ref": "NPG_70_36", "Sitter": [ { "Name": "Neil Armstrong", "Birth Date": "1930-08-05" }, { "Name": "Buzz Aldrin", "Birth Date": "1930-01-20" }, { "Name": "Michael Collins" } ], "DateOfWork": "1969" }, { "Title": "Neil Armstrong", "Artist": "Robert Theodore McCall", "Ref": "S_NPG_2010_51", "Sitter": [ { "Name": "Neil Armstrong" } ], "DateOfWork": "2009" }, ... … ] <#ArtworkMapping> rml:logicalSource [ rml:source “http://ex.com/artworks.json”; rml:rererenceFormulation ql:JSONPath ; rml:iterator “$.[*]” ] ; rr:subjectMap [ rr:template “http://ex.com/{Ref}”]; rr:predicateObjectMap [ rr:predicate rdfs:label ; rr:objectMap [ rml:reference “$.[*].Title” ] ]. <http://ex.com/NPG_70_36> rdfs:label “Apollo 11 Crew”.
  • 34. [ ... … { "Title": "Apollo 11 Crew", "Artist": "Ronald Anderson", "Ref": "NPG_70_36", "Sitter": [ { "Name": "Neil Armstrong", "Birth Date": "1930-08-05" }, { "Name": "Buzz Aldrin", "Birth Date": "1930-01-20" }, { "Name": "Michael Collins" } ], "DateOfWork": "1969" }, { "Title": "Neil Armstrong", "Artist": "Robert Theodore McCall", "Ref": "S_NPG_2010_51", "Sitter": [ { "Name": "Neil Armstrong" } ], "DateOfWork": "2009" }, ... … ] <#SitterMapping> rml:logicalSource [ rml:source “http://ex.com/artworks.json”; rml:rererenceFormulation ql:JSONPath ; rml:iterator “$.[*].Sitter” ] ; rr:subjectMap [ rr:template “http://ex.com/{Name}”]; rr:predicateObjectMap [ rr:predicate ex:birth_date ; rr:objectMap [ rml:reference “$.[*].Sitter.Birth Date” ]]. <http://ex.com/Neil+Armstrong> ex:birth_date “1930-08-05”.
  • 35. RDF Mapping Language (RML) Source Triples Map Logical Source Subject Map Predicate-Object Map Predicate Map Object Map Term Map template constant reference Iterator Reference Formulation Referencing Object Map Triples Map Join Condition Parent column Child column
  • 36. RDF Mapping Language (RML) Editing mappings with Karma http://www.isi.edu/integration/karma/
  • 39. mapping-driven processing: processing driven by the mapping module data-driven processing: processing driven by the extraction module
  • 40. Extraction Module Mapping Module RML Processor
  • 41. Mapping Hierarchical Sources into RDF using the RML mapping language RML: http://rml.io RML Namespace: http://semweb.mmlab.be/ns/rml RML Processor: https://github.com/mmlab/RMLProcessor Contact us Anastasia Dimou [email protected] @natadimou Miel Vander Sande [email protected] @Miel_vds