I'm new to SPARQL and I'm trying to do the following thing for my assignment:
I need to pull out actors but only those that were born on a defined date. My problem is that every time I try to filter by a certain integer value, I get "Error making the query, see cause for details" (btw, I have no idea what "cause" is in this matter, there is no error log, or anything clickable for me to actually check what went wrong).
Here is my query:
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX movie: <http://data.linkedmdb.org/resource/movie/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX db: <http://dbpedia.org/ontology/>
PREFIX dbpprop: <http://dbpedia.org/property/>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?actor ?dbpediaLink ?name ?date month(?date) WHERE {
?actor a movie:actor .
?actor owl:sameAs ?dbpediaLink .
SERVICE <http://dbpedia.org/sparql> {
?dbpediaLink dbpprop:name ?name .
?dbpediaLink dbpprop:dateOfBirth ?date
}
FILTER(month(?date) = 2)
}
LIMIT 10
So, what I'm trying to do here is get all actors born in February, and with this I get the error mentioned above.
The following combinations of FILTER
return the mentioned error:
FILTER(month(?date) = 2)
FILTER(month(?date) > 1 && month(?date) < 3)
FILTER(month(?date) >= 2 && month(?date) <=2)
Basically all the variations for getting back only people born in February return the error. I even tried casting the integers explicitly as "2"^^xsd:integer
(because the month()
function returns an integer) and it still failed.
I also tried (for some other problem) to get actors that have exactly 10 letters in their name but I also ran into the same problem.
It seems that any FILTER
I try to make that uses =
or tries to FILTER
by multiple conditions (using &&
) fails.
I'm stuck on this for the last 2 days...Am I missing something?
I should probably mention that I'm using locally deployed Fuseki server with LMDB dump, and I'm running the queries at http://localhost:3030