janeloulou
janeloulou

Reputation: 17

SPARQL query not returning any data

I am new to RDF, so it will be very nice if you can help me with this!

I am trying to query the subject of pickles called "Umeboshi"(It is japanese pickles) as follows:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
PREFIX type: <http://dbpedia.org/class/yago/>       
PREFIX prop: <http://dbpedia.org/property/>
PREFIX onto: <http://dbpedia.org/ontology/>

SELECT  ?label ?subject
WHERE {

?Thing
       rdfs:label ?label;
       prop:subject?subject.
 FILTER (?label = "Umeboshi")
}

This query doesn't give me any data.

As I don't know where to find available properties I am referring to the Umeboshi page on dbpedia http://live.dbpedia.org/page/Umeboshi.

Thank you very much for your help!

Upvotes: 0

Views: 62

Answers (1)

Sirko
Sirko

Reputation: 74046

Two things I found:

  1. In the page you give, the label is given in English, but in your query you omit the language.
  2. subject has a different namespace. It is a dcterm concept and not a dbpedia property.

This leads to the following, changed query, which results in three bindings:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
PREFIX dct:  <http://purl.org/dc/terms/>

SELECT ?label ?subject
WHERE {

?Thing
       rdfs:label   ?label;
       dct:subject ?subject.

 FILTER (?label = "Umeboshi"@en)
}

Upvotes: 3

Related Questions