gaurav1207
gaurav1207

Reputation: 703

Bulk import in NEO4j

Data (snippet) in node file:

C0243192
C1522005
C1524024
C1524059
C1623416
C1959616.......

Header file for Node file:

conceptID:ID

Relationship(snippet) file date:

C0000039,C0001555,AQ_
C0000039,C0001688,AQ_
C0000039,C0002776,AQ_ .....

Header file for relationship file:

:START_ID,:END_ID,:TYPE

When I try to run bulk import script as

neo4j-import --into graph.db --nodes:concept "MRREl-nodes,nheader" --relationships "MRREl-relations,rheader" --deliminiter ,  --skip-duplicate-node true

I get error:

 Error in input data
 Caused by:Missing header of type START_ID, among entries [C0000005:string, C0036775:string, RB_:string]

Upvotes: 0

Views: 486

Answers (2)

gaurav1207
gaurav1207

Reputation: 703

This error was there because I was putting the header file after the data file

Instead of

MRREl-nodes,nheader 

it should be

nheader,MRREl-nodes

Upvotes: 1

Fabio Lamanna
Fabio Lamanna

Reputation: 21552

It might be related to the delimiter keyword:

neo4j-import --into graph.db --nodes:concept "MRREl-nodes,nheader" --relationships "MRREl-relations,rheader" --delimiter ","  --skip-duplicate-node true

where (apart of a typo) you should quote your separator, in this case ",", or even avoid it since the comma is the default.

Hope that helps.

Upvotes: 1

Related Questions