Cannot merge the following node because of null property

Hi everyone I was trying to load the Zachary's karate club dataset, which can be found here. The file "zkc.graph" was copied in the import folder and I ran this code:

LOAD CSV FROM "file:///zkc.graph" AS row
  FIELDTERMINATOR " "
  MERGE (p:Person {pId: toInteger(row[0]) + 1})
  MERGE (q:Person {pId: toInteger(row[1]) + 1})
  MERGE (p)-[:LINKED_TO]->(q)

but unfortunately I have this error mesage

Cannot merge the following node because of null property value for 'pId': (:Person {pId: null}) (Failure when processing file '/C:/Users/MAURICIO/AppData/Local/Neo4j/Relate/Data/dbmss/dbms-238a0987-27b1-43d4-9136-a2d5a502f208/import/zkc.graph' on line 1.)

The dataset header is as follows:

Dataset

  • neo4j version: Neo4j 4.2.0
  • desktop version: Version: 1.3.11
  • browser version: Chrome version 86.0.4240.198 (Build oficial) (64 bits)

Thank you

Mau

There is no header for this file. Just delete the first row with that header or start from row 2.

Hi thank you for your reply, I basically copied and pasted the information into a CSV file and executed the same code as above but just changing the extension to CSV.

Image

Thank you

Mau