Doubt in a code

13 views
Skip to first unread message

Sumit Saurabh

unread,
Nov 27, 2017, 4:27:32 PM11/27/17
to Neo4j
USING PERIODIC COMMIT
LOAD CSV FROM 'file:///file1' AS line
MERGE (n:User { name: line[0] })
MERGE (m:User { name: line[2] })
CREATE (n)-[:hashtag{ name: line[1]}]->(m)

create (n:User{id:'first',x:TRUE,y:TRUE,a:0,b:0}) return n

USING PERIODIC COMMIT
LOAD CSV FROM 'file:///file2' AS line
Match (k:User) where k.id='first'
MERGE (n:User { name: line[0] }) on create set k.x=FALSE on match set k.x=TRUE
MERGE (m:User { name: line[2] }) on create set k.y=FALSE on match set k.y=TRUE
CREATE (n)-[:hashtag{ name: line[1]}]->(m)
Set k.b = CASE (k.x OR k.y) when TRUE THEN k.b + 1 ELSE k.b END
Set k.a = CASE (k.x XOR k.y) when TRUE THEN k.a + 1 ELSE k.a END

Is there something wrong with this code?

Because it is not working properly.

Michael Hunger

unread,
Nov 28, 2017, 3:47:12 AM11/28/17
to ne...@googlegroups.com
Can you provide more details of what doesn't work of all your statements?

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages