Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-15-2022 07:21 AM - edited 06-15-2022 07:22 AM
Hello everyone!!
I'm looking for a way to resolve this problem. I need run graph algorithms on a graph that is in json format, like this (not the real, but similar):
{
nodes: [
{
__id: "some_id",
type: "NodeType",
inE: ["node_id1", "node_id2", .....],
outE: ["node_id100", "node_id200", .....]
},
.......
]
}
The trouble is that I can't save this graph in Neo4j storage, is only for calculation. So my question, there is a way to create a Graph Projection from this json file??
Solved! Go to Solution.
06-16-2022 05:13 AM
You can try the graph construct method in the python client: https://neo4j.com/docs/graph-data-science/current/python-client/graph-object/#_constructing_a_graph
You'd need to map your json to the correct pandas dataframe formatting, but that will let you convert your json file directly into a graph projection.
06-15-2022 08:44 AM
06-15-2022 10:29 AM
Thanks I'll try it and comment later if result
06-15-2022 10:43 AM
@Cobra answer is valid for create graph, but i'm still facing issue of create a Graph Data Science graph projection for this virtual graph, as i need run GDS algorithms on this virtual graph
06-15-2022 11:53 PM
Can you share the JSON file and the query you used to create the virtual graph?
06-16-2022 05:13 AM
You can try the graph construct method in the python client: https://neo4j.com/docs/graph-data-science/current/python-client/graph-object/#_constructing_a_graph
You'd need to map your json to the correct pandas dataframe formatting, but that will let you convert your json file directly into a graph projection.
06-16-2022 07:26 AM
Thanks!!! This work!!!!
All the sessions of the conference are now available online