This document provides an overview of using SPARQL as a query language for querying data across the web of data. It discusses how data from different sources like relational databases, Excel files, XML, JSON, microdata, etc. can be converted to RDF and queried using SPARQL. The tutorial will cover topics like federated querying across local and remote SPARQL endpoints, using SPARQL CONSTRUCT to map schemas, instance matching with Silk, and visualizing SPARQL results. Hands-on sessions will have participants install Jena tools and run queries on sample RDF data and endpoints.
Practical Cross-Dataset Queries with SPARQL (Introduction)
1. Practical Cross-Dataset Queries
on the Web of Data
Tutorial @ WWW2012, Lyon, France
Richard
Cyganiak, KnudMöller, AnjaJentzsch, An
dreas Schultz, Robert Isele, Pablo
Mendes
2. The Web is becoming a platform for
data exchange.
• Microdata, Schema.org, web APIs, Linked Data
Cloud, Open Data movement, …
• Often need to combine local and remote data
from several heterogeneous sources
• Scripting and mash-ups. This works, but can
we do better?
3. SPARQL as a query language
for the Web
• Data from all of these data sources can be
converted to RDF using off-the-shelf tools, or
the sources are already RDF.
• SPARQL is W3C's standard query language for
RDF
• SPARQL 1.1 just out, great new features for
working with heterogeneous data
4. Caveats
• We will focus on ad-hoc queries.
• This is not just about what works, but also
about what doesn't work.
5. How to get data into RDF format
• Relational: R2RML standard; D2RQ, Virtuoso
RDF Views, RevelytixSpyder
• Excel, CSV: RDF Extension for Google Refine,
XLWrap
• XML: XSPARQL
• JSON: JSON-LD
• Microformats, Microdata: Apache Any23
• Collect data from many web pages: LDSpider
9. Scenario: Local SPARQL engine,
load data from files on the fly, no store
SPARQL client
Local
SPARQL engine RDF
file
Conversion
Non-
RDF
file
Remote
RDF
file
10. Scenario: CONSTRUCT the input data
SPARQL client
Local Local
RDF SPARQL engine RDF
file file
SPARQL SPARQL
CONSTRUCT CONSTRUCT
query query
SPARQL engine SPARQL engine
RDF RDF
Store Store
11. Scenario: Federated Query
SPARQL client
Local
RDF SPARQL engine
file
Basic Federated Query
SPARQL engine
RDF
Store
15. Hands-on sessions
• USB sticks with data, queries, and instructions
• Install Apache Jena command line tools
• Need a browser with a JavaScript console
(recommended: Firefox+Firebug or Chrome)
17. Presenters
• Richard Cyganiak, DERI
• KnudMöller, Talis
• AnjaJentzsch, FU Berlin
• Andreas Schultz, FU Berlin
• Robert Isele, FU Berlin
• Pablo Mendes, FU Berlin
• (Christophe Guéret, VUA)
• (Michael Hausenblas, DERI)