Neo4j: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
Zeile 1: | Zeile 1: | ||
import data in json format | run neo4j<syntaxhighlight lang="bash"> | ||
docker run \ | |||
--name neo4j \ | |||
-p 7474:7474 -p 7687:7687 \ | |||
-v $HOME/neo4j/data:/data \ | |||
-v $HOME/neo4j/import:/import \ | |||
-e NEO4J_AUTH=neo4j/password \ | |||
-e NEO4JLABS_PLUGINS='["apoc", "graph-data-science"]' \ | |||
-e NEO4J_dbms_security_procedures_unrestricted=gds.*,apoc.* \ | |||
-e NEO4J_apoc_import_file_enabled=true \ | |||
-e NEO4J_apoc_import_file_use__neo4j__config=true \ | |||
neo4j:latest | |||
</syntaxhighlight>import data in json format | |||
CALL apoc.load.json("file:///locations.json") YIELD value | CALL apoc.load.json("file:///locations.json") YIELD value |
Version vom 11. Juni 2025, 17:47 Uhr
run neo4j
docker run \
--name neo4j \
-p 7474:7474 -p 7687:7687 \
-v $HOME/neo4j/data:/data \
-v $HOME/neo4j/import:/import \
-e NEO4J_AUTH=neo4j/password \
-e NEO4JLABS_PLUGINS='["apoc", "graph-data-science"]' \
-e NEO4J_dbms_security_procedures_unrestricted=gds.*,apoc.* \
-e NEO4J_apoc_import_file_enabled=true \
-e NEO4J_apoc_import_file_use__neo4j__config=true \
neo4j:latest
import data in json format
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);