Hi, actualy i do more or less the same
regards koen
2017-11-21 4:29 GMT+01:00 Liping Huang :
> Hi Koen,
>
> I have the same requirements and I do it in follow way:
>
> MERGE (n:NodeLabel{id: {id}})
> ON CREATE SET
> n.XXX = YYY,
> ..
> ON MATCH SET
> n.XXX = ZZZ
>
> MERGE (n1:No
Hi Koen,
I have the same requirements and I do it in follow way:
MERGE (n:NodeLabel{id: {id}})
ON CREATE SET
n.XXX = YYY,
..
ON MATCH SET
n.XXX = ZZZ
MERGE (n1:Node1{id: {id}})
MERGE (n2:Node2{id: {id}})
MERGE (n1) -[r:REL]-(n2)
ON CREATE SET
r.XXX = YYY,
ON MATCH SET
r.X
Hi thx , i will do some more testing .. i also have some CREATE statements
since the input data set results sometimes in multiple rels between 2
nodes..
2017-08-22 12:46 GMT+02:00 'Michael Hunger' via Neo4j <
neo4j@googlegroups.com>:
> This statement is idempotent, but also updates properties on
This statement is idempotent, but also updates properties on nodes / rels
HTH Michael
LOAD CSV FROM "url" as row
// get-or-create-node
MERGE (n1:Node1 {row.id1})
// update prop
SET n1.prop1 = row.prop1
// get-or-create-node
MERGE (n2:Node2 {row.id2})
// update prop
SET n2.prop2 = row.prop2
// get
Hi andy, i am already using the merge command which works fine to create
unique records but i also want to be able to for example update / change an
attribute on an existing node .. i maybe have to do some more testing with
all merge options ..
koen
2017-08-21 10:12 GMT+02:00 LAW Andy :
> Koen,
Koen,
I think that you are looking for the MERGE command.
http://neo4j.com/docs/developer-manual/current/cypher/clauses/merge/
Later,
Andy
> On 21 Aug 2017, at 05:32, koen wrote:
>
> In addition.. so if i would run a LOAD CSV twice in a row with exactly
> the same file i would like not
In addition.. so if i would run a LOAD CSV twice in a row with exactly
the same file i would like nothing to happen to the nodes / rels (meaning
no creation of duplicate rels etc).. If i would run the import with almost
the same csv file (with only one property changed somewhere in the file