wdq
wdq copied to clipboard
SPARQL examples won't work
trafficstars
Samples from https://www.mediawiki.org/wiki/Wikibase/Indexing/SPARQL_Query_Examples like
SELECT DISTINCT ?country ?countryLabel ?capital ?capitalLabel
WHERE
{
?country wdt:P31 wd:Q3624078 .
FILTER NOT EXISTS {?country wdt:P31 wd:Q3024240}
OPTIONAL { ?country wdt:P36 ?capital } .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?countryLabel
won't work:
% wdq < sample.sparql
invalid SPARQL query
Using --force won't help it.
What am I missing?
PS: A manual curl access with encoded sparql query works.
Thanks for the report. I just verified that the given SPARQL query does not work with the current wdq but should works with the underlying SPARQL parser, so I am going to fix it!