fdabhi
fdabhi

Reputation: 309

Fetching all the paths between two nodes using SQL Server Graph 2017

I found many examples of fetching paths between 2 nodes in neo4j and gremlin but could not find any on SQL Server Graph 2017. Though it uses Cypher's Match, I was thinking if it is possible to find the path using only Match?

Thanks in advance!

Upvotes: 3

Views: 205

Answers (1)

andowero
andowero

Reputation: 499

Since SQL Server 2019 you can use SHORTEST_PATH algorithm. It doesn't allow you to list all paths though, only the shortest one, hence the name.

You can either create your own CLR function to do that, use WHILE cycle to traverse the graph step by step or download the whole graph and traverse it using C#.

Upvotes: 1

Related Questions