[ECODP-dev] SPARQL background information

ZAJAC Agnieszka (OP) Agnieszka.ZAJAC at publications.europa.eu
Fri Mar 22 07:24:44 UTC 2013


Dear Bert,

Thank you for the slides and the examples. We will read them before our training.
I've tested quickly your examples and indeed they render expected results on tenforce odp website.
It's not the case for our portal but I know that Virtuoso is still not in synch with ckan so I will try it out again when it's fixed.

One of the objectives of the training is to be able to test Virtuoso as regards the coherence of the data with ckan. Therefore, we would need to build queries that would give as results for example for each publisher (then I suppose it would be like your 3rd example for data from Estat).

In the meantime I forward you specific questions on Sparql from one of my colleagues:
•       Clarify Default Data Set Name (Graph IRI) for ODP : http://open-data.europa.eu/open-data ? http://open-data.europa.eu/dataset ?
•       Which version of SPARL we use 1.1 ?

Best regards,
Agnieszka


-----Original Message-----
From: Bert Van Nuffelen [mailto:bert.van.nuffelen at tenforce.com]
Sent: Thursday, March 21, 2013 10:20 PM
To: ZAJAC Agnieszka (OP); ISOARD Olivier (OP); HOHN Norbert (OP)
Cc: Project list for EC ODP CKAN project
Subject: SPARQL background information

Hi Agnieszka,

the next slides series are public courses which nicely explain Linked Data (RDF)

a) RDF: http://slidewiki.org/deck/750#tree-0-deck-750-1-view
b) SPARQL: http://slidewiki.org/deck/750#tree-750-deck-1283-8-view

you need to understand first the basics of the RDF data structures
before you start with the querying part SPARQL.
There are more chapters in the course but these cover the core of your request.

Example queries:
* find dataset graphs which contain a title that contains 'Forest' (at most 10)
  select distinct ?g ?o where { graph ?g {?s
<http://purl.org/dc/terms/title> ?o. filter regex(?o, 'Forest', 'i') }
} LIMIT 10

* find all triples ?s ?p ?o  of a dataset set
  select * from
<http://open-data.europa.eu/data/dataset/Zzsmry9sSf5q137W4cvLA> where
{?s ?p ?o} limit 1000

* find datasets which belong to the publisher ESTAT
  select distinct ?g where { graph ?g {?s
<http://purl.org/dc/terms/publisher>
<http://publications.europa.eu/resource/authority/corporate-body/ESTAT>
}} limit 10

The example queries result in answers w.r.t. our test system odp.tenforce.com

For more exploration of the data in Virtuoso you can have a look into
section 10.3 THE RDF2CKAN DATASET RDF STRUCTURE of the operations
manual.
There you find the rdf queries being executed to retrieve specific
information to transfer to CKAN. These queries can be embedded in the
above once to specify additional conditions
in your select.

kind regards,

Bert

--
Bert Van Nuffelen

Semantic Technologies Software Architect at TenForce
www.tenforce.be<http://www.tenforce.be>

Bert.Van.Nuffelen at tenforce.com<mailto:Bert.Van.Nuffelen at tenforce.com>
Office: +32 (0)16 31 48 60
Mobile:+32 479 06 24 26
skype: bert.van.nuffelen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.okfn.org/mailman/private/ecodp-dev/attachments/20130322/14d44039/attachment.html>


More information about the ecodp-dev mailing list