Hi all,
newbie warning!!!!
So I created a set of nodes and then exported the data to a .json file
I am using version 4.2.3 and APOC 4.201
Now I have deleted my data and am importing the json back. (my current exercise)
The data looks like
[
{
"n": {
"identity": 0,
"labels": [
"FEMALE"
],
"properties": {
"pid": "92",
"xref": "9999",
}
}
}, ......................etc
However, I can import and create the nodes but the is no data
{
"identity": 2,
"labels": [
"Person"
],
"properties": {
}
}
My code looks like
CALL apoc.load.json("files:/home/XXX/.local/share/neo4j-relate/dbmss/dbms-3d3a0cbb-e84d-4ea0-a5b9-b53c63c9f44c/import/exportData.json")
YIELD value AS n //values in file
CREATE (p:Person {pid: n.pid})
SET p.name = n.name,
p.ref = n.ref,
p.xref = n.xref
Maybe I do not understand?
After the call the YIELD return a set of n (as per the code) - is this a list?
To create the p:Person I use CREATE as per the code and SET the other properties... but with a null result.
I have learning through the cybertext and youtube videos - however some of the videos are of older neo4j versions and there seems to be differences
-
Is my understanding that the YIELD results in a set? and the CREATE then processes that set iteratively?
-
What is wring with my code - I am missing something
Thanks in advance