0

I'm importing CSV files to Neo4J, but Neo4J doesn't import my primary key.

I'm using this:

LOAD CSV WITH HEADERS FROM "file:///C:/c/tabela_sujeito.csv" AS row
CREATE(:Sujeito{suj_ID:row.id, idade:row.idade, altura:row.altura, peso:row.peso, genero:row.genero, mao_dominante:row.mao_dominante});

suj_ID is my primary key, and it isn't imported, unlike the other attributes.

Rajendra Kadam
  • 4,004
  • 1
  • 10
  • 24
dlmartins
  • 51
  • 9

1 Answers1

1

As suggested by @InverseFalcon, You need to use row.suj_ID instead of row.id in your query.

LOAD CSV WITH HEADERS FROM "file:///C:/c/tabela_sujeito.csv" AS row
CREATE(:Sujeito{suj_ID:row.suj_ID, idade:row.idade, altura:row.altura, peso:row.peso, genero:row.genero, mao_dominante:row.mao_dominante});
Rajendra Kadam
  • 4,004
  • 1
  • 10
  • 24