Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-14-2022 04:04 AM
Hi All,
I am trying to create an application data interaction view in Neo4J. I have multiple applications (App1, App2...AppN) that interact with each other and exchange various data entities (DataEntity1, DataEntity2...DataEntityM). there could be one or more data entities between any two apps. A dataentity can be be exchanged between multiple apps (thereby creating a data flow path).
CREATE (App1:Application { name: "app1", businessunit: "unit1" })
CREATE (App2:Application { name: "app2", businessunit: "uni2" })
CREATE (App3:Application { name: "app3", businessunit: "uni3" })
CREATE (App1)-[ :SENDS_DATA { mode: "Automatic", dataentity: "dataentity1" } ]->(App3)
,(App2)-[ :SENDS_DATA { mode: "Automatic", dataentity: "dataentity2" } ]->(App3)
,(App2)-[ :SENDS_DATA { mode: "Automatic", dataentity: "dataentity3" } ]->(App3)
,(App2)-[ :SENDS_DATA { mode: "Automatic", dataentity: "dataentity4" } ]->(App3)
,(App1)-[ :SENDS_DATA { mode: "Automatic", dataentity: "dataentity2" } ]->(App3)
now I want to see the data flow for 'dataentity2'
match path = ()-[r]->() where r.dataentity = 'dataentity2' return path
gives me this. I do get the path but along with other dataentities as well. I want only the relationship for 'dataentity2'
how to achieve this?
Solved! Go to Solution.
02-15-2022 04:50 PM
Go to the Neo4j Browser options (gear icon) and turn off connect result nodes to see only data you queried in the force directed graph layout. The Browser will connect items not returned by the query with the connect result nodes option on.
02-14-2022 04:13 AM
to add another question to that, some of these :SENDS_DATA relationships are uni-directional but some are bi-directional. what's the best way to handle this such that they are depicted with a uni or bi-directional arrows on the generated graph?
02-14-2022 01:23 PM
Try to look at your results using the "test" or "table" options, instead of the "graph" option. Do you get the one path you expected in those views? From what I have observed, the graph view renders all relationships between the nodes that resulted from your query. The other views return the exact rows from you query.
02-15-2022 01:24 AM
Thanks @glilienfield Yes that's what I had observed earlier. "text" and "table" tabs have only the matching relationship but the graph renders all relationships. is there any workaround?
02-15-2022 04:50 PM
Go to the Neo4j Browser options (gear icon) and turn off connect result nodes to see only data you queried in the force directed graph layout. The Browser will connect items not returned by the query with the connect result nodes option on.
02-16-2022 12:01 AM
fantastic! Thanks @dan.flavin_enterpris . this exactly solves my problem. much appreciated.
All the sessions of the conference are now available online