query-72d2cae9155a97ea462f395ee3b29cdf
https://github.com/blazegraph/database/wiki/RDF_GAS_API
Use at
- https://query.wikidata.org/sparql
PREFIX gas: <http://www.bigdata.com/rdf/gas#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
SELECT ?product ?depth
WHERE
{
SERVICE gas:service
{
gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.BFS" .
gas:program gas:linkType wdt:P279 .
gas:program gas:traversalDirection "Reverse" .
gas:program gas:in wd:Q2424752 .
gas:program gas:out ?product .
gas:program gas:out1 ?depth .
gas:program gas:maxIterations 20 .
}
}
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("?product"):::projected
c2(["gas:program"]):::iri
c8(["Reverse"]):::literal
c10(["wd:Q2424752"]):::iri
c6(["wdt:P279"]):::iri
c4(["com.bigdata.rdf.graph.analytics.BFS"]):::literal
c14(["20^^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