Re: [Neo4j] If one MATCH is empty the entire query returns empty

2017-11-29 Thread clement
Ok thank you ! It works very well ! Le mardi 28 novembre 2017 21:39:22 UTC+1, Michael Hunger a écrit : > > MATCH (p:Person) WHERE p.name =~ '(?i).test.*' > WITH COLLECT(DISTINCT {name: p.name}) as persons > OPTIONAL MATCH (pla:Place) WHERE pla.name =~ '(?i).*test.*' > RETURN persons, [x IN

Re: [Neo4j] Re: uuid function

2017-11-29 Thread Kamal Murthy
Hi Koen, If one GUUID for one machine name, then you can create unique constraint on name property and this avoids duplicate records. CREATE CONSTRAINT ON (s:Server) ASSERT s.name IS UNIQUE; After creating this constraint, I ran MERGE (server:Server { name: "Test", uuid: apoc.create.uuid() }

[Neo4j] Re: uuid function

2017-11-29 Thread Kamal Murthy
Hi Koen, It is missing WITH line statement. Try this: USING PERIODIC COMMIT LOAD CSV WITH HEADERS FROM "file:///test.csv" AS line FIELDTERMINATOR ';' *WITH line, * *apoc.create.uuid() as uid* MERGE (server:Server { name: line.'Machine Name`, uuid: *uid* }) Or, USING PERIODIC COMMIT LOAD CSV

Re: [Neo4j] Re: uuid function

2017-11-29 Thread Koen Kleingeld
H kamal thanks, that works too. i guess the original problem was due to the "call" statement being there .. removing that seems to work although i thought i tested that already .. it also needed small rewrite to SET the uuid property to avoid duplicate record conflicts so for apoc functions no