query-9169f5dfce9f4b1baedffaef60a2c331

rq turtle/ttl

Federates searches with https://query.wikidata.org/bigdata/namespace/categories/sparql?query=SPARQL example, but that turned out to be a fail. this> somewhat after https://query.wikidata.org/bigdata/namespace/categories/sparql?query=SPARQL - which I vaguely understand to be a SPARQL endpoint. Can we access that endpoint thru WDQS using a federated query? If so, the SPARQL below is a candidate; I tried replacing gas:service with <https://query.wikidata.org/bigdata/namespace/categories/sparql?query=SPARQL, but find it's not accessible via WDQS, but available from Wikidata Query Service/CategoriesI came across

Use at

PREFIX gas: <http://www.bigdata.com/rdf/gas#>
prefix mediawiki: <https://www.mediawiki.org/ontology#> 

SELECT * WHERE {
SERVICE gas:service {
     gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
     gas:program gas:linkType mediawiki:isInCategory .
     gas:program gas:traversalDirection "Reverse" .
     gas:program gas:in <https://en.wikipedia.org/wiki/Category:Ducks>. # one or more times, specifies the initial frontier.
     gas:program gas:out ?out . # exactly once - will be bound to the visited vertices.
     gas:program gas:out1 ?depth . # exactly once - will be bound to the depth of the visited vertices.
     gas:program gas:maxIterations 8 . # optional limit on breadth first expansion.
  }
} ORDER BY ASC(?depth)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?depth"):::projected v2("?out"):::projected c2(["gas:program"]):::iri c8(["Reverse"]):::literal c10([https://en.wikipedia.org/wiki/Category:Ducks]):::iri c4(["com.bigdata.rdf.graph.analytics.BFS"]):::literal c6([https://www.mediawiki.org/ontology#isInCategory]):::iri c14(["8^^xsd:integer"]):::literal subgraph s1["http://www.bigdata.com/rdf/gas#service"] style s1 stroke-width:4px; c2 --"gas:gasClass"--> c4 c2 --"gas:linkType"--> c6 c2 --"gas:traversalDirection"--> c8 c2 --"gas:in"--> c10 c2 --"gas:out"--> v2 c2 --"gas:out1"--> v1 c2 --"gas:maxIterations"--> c14 end