Breadth-first search (BFS)
gf_bfs(x, from_expr, to_expr, max_path_length = 10, edge_filter = NULL, ...)
An object coercable to a GraphFrame (typically, a gf_graphframe).
gf_graphframe
Spark SQL expression specifying valid starting vertices for the BFS.
Spark SQL expression specifying valid target vertices for the BFS.
Limit on the length of paths.
Spark SQL expression specifying edges which may be used in the search.
Optional arguments, currently not used.
# NOT RUN { g <- gf_friends(sc) gf_bfs(g, from_expr = "name = 'Esther'", to_expr = "age < 32") # }
Run the code above in your browser using DataCamp Workspace