MERGE (o:Organization {id: {param}.id})
SET o.prop1 = {param}.prop1
SET o.prop2 = {param}.prop2
As you can see, it is a better design to write key properties and others separately.
MERGE searches for the same node by label and parameter.
If there is data, it updates it. If not, it creates it.
Usually, the search items are given an index.
If you write all the items here, you will have to index all the items, which is bad design.
My dict(data) looks like - {'id': '410a9bc9-2dfe-332e-9662-9377baa65697', 'name': 'ALLINA HEALTH SYSTEM'} , the values associated with id and name is dynamic.
I am new to neo4j so can you please suggest to me how to form merge with this param?
I tried the below queries but not getting how to do it.
data={dynamic dict}
query="MERGE(o: Organization{id: {$data}.id}) SET o.id = {$data}.id SET o.name = {$data}.name"
nodes = session.run(query,param=data)
Expected result - Create a node with parameters id, name