neo4j - Piping RETURN query to CREATE a new node (in-turn relationship) -


i have csv file with:

    name,city,country     aa,london,uk     bd,berlin,germany     cr,helsinki,finland     fe,washington,us 

i trying import *.csv , create relationship. while import part successful, not able assign special relationship between nodes

eg:

(city)-[capital_of]->(country) // works (bw node node) 

but,

create(state1:state{name=washington, continent:north america)} 

now, need create new relationship between (state1)-[is_different_to]->(?) where, ?is washington dc city (the node created).

using periodic commit load csv headers "file:///db.csv" csvline merge(city:city{name:csvline.city})  match (city:city{name:'washington'}) return city.name  create(state1)-[:is_different_to]->(?) 

i want fill in ? retrieved node name

thanks

what return name string no node. should like

 match()(where op state1)  match(city:city{name:'washington'})  create(state1)-[:is_different_to]->(city)  return city.name 

or maybe don't it


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -