0
Neo4J Community Edition 버전 3.2.1을 사용합니다. 나는 allready이의 노드를 만든CSV LOAD를 사용하여 Neo4J/Cypher에서 CSV 관계를 얻는 방법
node1,relation,node2,type
1,RELATED_TO,2,Married
2,RELATED_TO,1,Married
1,RELATED_TO,3,Child
2,RELATED_TO,3,Child
3,RELATED_TO,4,Sibling
3,RELATED_TO,5,Sibling
4,RELATED_TO,5,Sibling
:
가장자리이 CSV 파일을 고려하십시오. 나는 다음 CSV로드 명령을 실행load csv with headers from
"file:///test_dataset/edges.csv" as line
match (person1:Person {pid:line.node1}),
(person2:Person {pid:line.node2})
create (person1)-[:line.relation {type:line.type}]->(person2)
을하지만 이것은 다음과 같은 오류를 반환
Invalid input '.': expected an identifier character, whitespace, '|', a length specification, a property map or ']' (line 5, column 24 (offset: 167))
"create (person1)-[:line.relation {type:line.type}]->(person2)"
내가 같이 "line.relation"를 사용할 수없는 것으로 보인다. csv load를 사용하여 csv-file (두 번째 열)의 관계를 어떻게 사용할 수 있습니까?
나는 this answer을 보았지만 기본 쿼리 언어를 사용하여이 작업을 수행하려고합니다. 기본적으로
load csv with headers from
"file:///test_dataset/edges.csv" as line
match (person1:Person {pid:line.node1}),
(person2:Person {pid:line.node2})
create (person1)-[:RELATED_TO {type:line.type}]->(person2)
감사합니다. 그런 다음 가져 오기 도구를 살펴 보겠습니다. –