wdq icon indicating copy to clipboard operation
wdq copied to clipboard

SPARQL examples won't work

Open Spiritdude opened this issue 9 years ago • 1 comments
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.

Spiritdude avatar Apr 24 '16 12:04 Spiritdude

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!

nichtich avatar Apr 24 '16 20:04 nichtich