Created
April 2, 2017 23:28
-
-
Save josep2/34f0feb47e7fc8fd9a6be766e828c764 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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