Skip to content

Instantly share code, notes, and snippets.

@josep2
Created April 2, 2017 23:28
Show Gist options
  • Save josep2/34f0feb47e7fc8fd9a6be766e828c764 to your computer and use it in GitHub Desktop.
Save josep2/34f0feb47e7fc8fd9a6be766e828c764 to your computer and use it in GitHub Desktop.
val g: GraphFrame = ...
// Look for from connections with cash greater than 20000
// To with ages less than 50 who are not friends
val f = g.bfs.fromExpr("cash > 20000").toExpr("age < 50")
.edgeFilter("relationship = 'follow'")
.maxPathLength(3)
.run()
f.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment