У меня есть запрос ниже в файле (Artist.rq), который я использую в следующей команде curl:
curl -H "Accept: application/json" --data-urlencode "query@Artist.rq" "https://query.wikidata.org/sparql?query="
Но я получаю следующую ошибку java:
SPARQL-QUERY: queryStr=
java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Encountered "<EOF>" at line 1, column 0.
Was expecting one of:
"base" ...
"prefix" ...
"select" ...
"construct" ...
"describe" ...
"ask" ...
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
...
Мой запрос:
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT ?inceptionDate ?logo ?genreLabel ?record_labelLabel ?countryLabel ?cityLabel WHERE {
OPTIONAL { wd:Q856941 wdt:P571 ?inceptionDate . }
OPTIONAL { wd:Q856941 wdt:P154 ?logo . }
OPTIONAL { wd:Q856941 wdt:P136 ?genre . }
OPTIONAL { wd:Q856941 wdt:P264 ?record_label . }
OPTIONAL { wd:Q856941 wdt:P495 ?country . }
OPTIONAL { wd:Q856941 wdt:P740 ?city . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
LIMIT 1
Что я делаю не так?