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
Post a Comment