-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get a specified node 2-hop subgraph with pyspark #444
Comments
hello, is there anyone take a look? thanks! |
@Reid00 Trying to follow your query. Let me know if I misunderstood. If I understand correctly, you are looking for edges in the graph to be treated as undirected? In GraphFrame, the edges are directed by nature. Thus, if you want the both reverse edges to be taken, you would need to add the reciprocal edges to the edges dataframe. |
Hi @Reid00 - I think you can do this with a motif and appropriate filters, for example something like:
Hope this helps. |
Hi guys,
I am fresh man about grahpx. I read the doc want to get the 2-hop subgraph, find this
but I noticed, this just 1-hop subgraph. I try use
bfs
, but I found it just get out direction like, get subgraph from a,bfs
below code, just get (a)-[]->(b)-[]->(c). In fact, I want to both directions, including (a)<-[]-(b)<-[]-(c) and (a)-[]->(b)<-[]-(c).is there any method can get a subgraph with specified node id?
The text was updated successfully, but these errors were encountered: