Hi Friends,
When trying to import an CSV using the query:
LOAD CSV WITH HEADERS FROM 'file:///nation.csv' AS nation
MERGE (n:NATION {n_nationkey: toInteger(nation.n_nationkey), n_name: nation.n_name, n_regionkey: toInteger(nation.n_regionkey), n_comment: nation.n_comment})
I am receving the following error:
Cannot merge the following node because of null property value for 'n_comment': (:NATION {n_comment: null})
I did modified the query as shown in the guide with :
LOAD CSV WITH HEADERS FROM 'file:///nation.csv' AS row with row where row.n_nationkey is not null
MERGE (n:NATION {n_nationkey: row.n_nationkey})
set n.n_name=row.n_name, n.regionkey=row.n_regionkey, n_comment=row.n_comment
But receiving the following error:
Variable n_comment
not defined (line 3, column 55 (offset: 200))
"set n.n_name=row.n_name, n.regionkey=row.n_regionkey, n_comment=row.n_comment"
I have few CSV that i want to import, and the one i am talking about it is in the screenshot attached.
I am not sure what am i doing wrong. Thank you in advance for your help.