cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Creating a query in neodash that will return only the relevant nodes

hello, 

I was wondering if there is a way to merge nodes into one node as the other ones represent information about the most important one.

for eample: 

I have this graph

verachkaverachk_0-1658241205597.png

What I wish to see is only the subGraphInstance ((alpha1) that in dark green) connected to the cellInstances nodes. Now each orange node has other nodes that represent his type and the function it uses and the variables. could i somehow merge it all to one node (cellInstance) that will have the others instead of nodes, as properties. ?

2 REPLIES 2

I think you are asking to merge all the orange nodes attached to the one green node into one orange node, with the properties consolidated. Is this correct?  What about properties that in more than one orange node? What about the relationships attached to each orange node? Should they be attached to the single resulting orange node?

Besides performing it in cypher, you may want to look at the APOC merge procedures.

https://neo4j.com/labs/apoc/4.4/overview/apoc.merge/

verachkaverachk
Graph Buddy

Hey 🙂

to make it more clear I drew the graph i wish to see in the neodash

my purpose is to get from the following graph

verachkaverachk_1-1658305350909.png

 

A graph that will look like this: each color i put here represents the nodes in the neo4j I wanted to see in a cell instance node. about the realtionship I wanted only these one I drew and all the other to omitt from my visualiztion. My purpose is to make my messy graph in the neo4j ,more clear on the visualization. Also I dont really need the labels inside the cellInstances I drew, I just wanted to make it more clear, I do need their data. (for example where I put cellType(for example in 2.6, what could be enough for me is see addition,) in Function it could be enough to see the function(same node 2.6 for exampele it could be enough to see x+y without the label Function if it's possible)

verachkaverachk_0-1658305269847.png

I hope it's more clear. 

Vera.