Skip to content

json - NEO4J

TODO

Dumping Data Procedure

  • Load data in
  • Index data
  • Relate data

Remember to check wiki.software.list.neo4j.errors

# data folder
/var/lib/neo4j/data
cp nvdcve-1.1-modified.json /var/lib/neo4j/
cypher-shell -u $neouser -p $neopass
cypher-shell -u neo4j -p neo4jneo4j
WITH "file:///nvdcve-1.1-modified.json" as url 
CALL apoc.load.json(url) YIELD value 
UNWIND keys(value) AS key
RETURN key, apoc.meta.type(value[key]);

WITH "file:///nvdcve-1.1-modified.json" as url 
CALL apoc.load.json(url) YIELD value 
UNWIND  value.CVE_data_numberOfCVEs as Cnt
RETURN Cnt;


CALL apoc.load.json('nvdcve-1.1-modified.json');
CALL apoc.load.json('file:///testcred.json');

WITH "file:///testcred.json" as url 
CALL apoc.load.json(url) YIELD value 
UNWIND keys(value) AS key
RETURN key, apoc.meta.type(value[key]);

WITH "file:///testcred.json" as url 
CALL apoc.load.json(url)

Source