Requête distribuée
Question
Quel est le pitch du film "Cabin Boy" ?
Indice
La base LinkedMDB ne contient pas cette information.
Indice
On peut trouver cette information sur le point DBPedia http://dbpedia.org/sparql.
Indice
Le pitch est l'objet de l'arc rdfs:comment.
Indice
Il faut utiliser ce filtre pour ne garder que les liens vers DBPedia :
FILTER(regex(str(?dbpedia), "dbpedia", "i"))
Indice
La requête distribuée se présente ainsi :
SERVICE <http://dbpedia.org/sparql> {
?dbpedia rdfs:comment ?pitch
}
Solution
1
SELECT ?film ?dbpedia ?pitch WHERE {
2
?film dc:title "Cabin Boy" .
3
?film owl:sameAs ?dbpedia .
4
FILTER(regex(str(?dbpedia), "dbpedia", "i"))
5
SERVICE <http://dbpedia.org/sparql> {
6
?dbpedia rdfs:comment ?pitch
7
}
8
}