Swirrl / drafter

A clojure service and a client to it for exposing data management operations to PMD
Other
0 stars 0 forks source link

Drafter not recognising standard "rdf:" prefix #282

Open BillSwirrl opened 6 years ago

BillSwirrl commented 6 years ago

This problem was noticed when someone was trying to run federated queries against statistics.gov.scot (with our service as the remote part of the query)

It looks like the sparql query engine on that site (and our stardog instances do this too) substitute 'rdf:type' in the generated remote query, for any appearance either of 'a' or the full URI for rdf:type.

Running a query like this directly against stardog works successfully:

SELECT ?s 
WHERE {
  ?s rdf:type <http://purl.org/linked-data/cube#DataSet>
}

but running it against the PMD sparql endpoint or against drafter (/v1/sparql/live) generates a 400 error. I think this is because the rdf: prefix is not recognised when the query is processed - perhaps by the RDF4J component in drafter?

It would be useful if this could be configured to recognise rdf: as a standard or 'built-in' prefix, so that we can support execution of federated queries

I haven't found anything in the sparql specification to say whether this is expected to be standard functionality

lkitching commented 6 years ago

This query is rejected by backend.common/validate-query which internally calls arq/sparql-string->arq-query. There doesn't appear to be an easy way to add known prefixes to the ARQ query parser.

RickMoynihan commented 6 years ago

@lkitching: FYI I've filed an issue with complexible about the stardog bug about not being able to unset default prefixes: https://complexible.zendesk.com/hc/en-us/requests/1397

lkitching commented 1 year ago

Note the stardog issue tracker has moved to https://support.stardog.com/