-2

I am new to Neo4j world, I have imported a big csv file into Neo4j including following headers:(so now every row of csv has following properties in neo4j and obj1 as node label)

obj1, obj2, method1, method2, method3

method 1 to 3 have float values resulting from comparing obj1 and obj2 pairwise already. So I want to set a threshold over method1(and for all other methods separately) and if checking value is above set threshold, obj2 property is deleted and to be created as a NEW NODE and an edge between obj1 property(which is already a node with its value as label) and new created obj2 node to be drawn and obj2 node get all of properties from obj1. hope anyone could help !!!

shafigh
  • 61
  • 1
  • 2
  • 10
  • I would like comments with downvote, so that i get technical feedback of my posts and learn new things, just hit-and-run belongs to child mentality – shafigh Sep 16 '18 at 13:27
  • I can't understand your question well, can you add more explanation to it? – mastisa Sep 16 '18 at 16:12
  • so imagine you have node with some properties right? now you want to check if value of one property (for example method1) is above some threshold, and if it is then you want to remove obj2 (it means another property) and make it an individual node...understood? – shafigh Sep 16 '18 at 17:40
  • I tried to answer your question base on my understanding of problem, let me know if there is any wrong assumption – mastisa Sep 17 '18 at 03:45

1 Answers1

0

ON HOLD

For example if we have node with TestNode label and a property called value and our threshold is 5:

Query to create first node:

CREATE (:TestNode {value:20})

Then we need to query these node and if value is greater than 5 I will remove value property, and then create new node:

MATCH (t:TestNode) WHERE t.value> 5 SET t.value=null CREATE (:TestNode {value:10})

First query result:

First query result

Second query result:

Second query result

mastisa
  • 1,875
  • 3
  • 21
  • 39