Construct a path query

I can't get the construct query works for a path query. This is what I have:

{ ?x ?p ?y }
PATHS start ?x = sample:CL129548 END ?y VIA ?p

What did I miss?

Hi Jean,

PATHS is an alternate query form to CONSTRUCT and SELECT. Try executing it without embedding it in another query, e.g.: PATHS start ?x = sample:CL129548 END ?y VIA ?p.


Hi Jess, Thanks for the rapid reply.The reason I embeded it in a construct query is to be able to see the graphical view or a json-ld output in Stardog Studio. There seems no other ways to get that kind of feature if running just the PATHS query. Or is there?

Hi Jean,

We already have some simple visualisation of paths in Stardog Studio where each path is rendered sequentially as a sequence of path edges. You can see all attributes for each edge, too.

I understand that you want to visualise paths as RDF, is that correct? We don't support that yet but we're considering a couple of possibilities. This should be relatively straightforward for queries like paths ... via ?p where all path edges are edges in the graph. It's somewhat trickier in the general case, like in our actors & movies examples, where actors are connected by tuples which aren't edges in the graph (rather each path edge represents a connection between two actors via a movie, i.e. 2 graph edges).

Also a typical issue with browsing path query results is seeing the same nodes many times (if many paths pass through them). We're considering various options to render them once and highlighting "important" nodes.

Let us know if you have wishes or thoughts.


Hi Pavel, that makes sense. Thanks for the explanation. PATHS is a great feature. Thanks for implementing it. Now that we know how to fire off a query to recursively traverse the graph and use PATHS to find the relationships, next is to figure out how best to present them.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.