Neo4j: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Die Seite wurde neu angelegt: „<poem> CALL apoc.load.json("file:///locations.json") YIELD value MERGE (l:Location {id: value.id}) SET l.name = value.name WITH l, value UNWIND value.lemmaID AS regestId MERGE (r:Regest {id: regestId}) MERGE (l)-[:MENTIONED_IN]->(r); </poem>“ |
Keine Bearbeitungszusammenfassung |
||
Zeile 1: | Zeile 1: | ||
< | <code> | ||
CALL apoc.load.json("file:///locations.json") YIELD value | CALL apoc.load.json("file:///locations.json") YIELD value | ||
// Create the Location node | |||
MERGE (l:Location {id: value.id}) | MERGE (l:Location {id: value.id}) | ||
SET l.name = value.name | SET l.name = value.name | ||
// Create Regest nodes and relationships | |||
WITH l, value | WITH l, value | ||
UNWIND value.lemmaID AS regestId | UNWIND value.lemmaID AS regestId | ||
MERGE (r:Regest {id: regestId}) | MERGE (r:Regest {id: regestId}) | ||
MERGE (l)-[:MENTIONED_IN]->(r); | MERGE (l)-[:MENTIONED_IN]->(r); | ||
</ | </code> |
Version vom 11. Juni 2025, 17:42 Uhr
CALL apoc.load.json("file:///locations.json") YIELD value
// Create the Location node
MERGE (l:Location {id: value.id})
SET l.name = value.name
// Create Regest nodes and relationships
WITH l, value
UNWIND value.lemmaID AS regestId
MERGE (r:Regest {id: regestId})
MERGE (l)-[:MENTIONED_IN]->(r);