Data got successfully loaded into neo4j in full mode. While importing data in incremental mode getting error details of which is mentioned below :
- neo4j desktop version:5.19.0
- command used: bin/neo4j-admin database import incremental --stage=prepare --verbose --force --skip-bad-relationships --skip-duplicate-nodes --nodes=import/person_test_incr.csv --nodes=import/touchpoint_incr_test.csv --relationships=import/relationships_incr_test.csv --relationships=import/relationships1_incr_test.csv
Error:
Neo4j version: 5.19.0
Importing the contents of these files into /home/vboxuser/.config/Neo4j Desktop/Application/relate-data/dbmss/dbms-b739dc1f-d763-4964-aca1-7ce12302d613/data/databases/neo4j:
Import mode: prepare
Nodes:
/home/vboxuser/.config/Neo4j Desktop/Application/relate-data/dbmss/dbms-b739dc1f-d763-4964-aca1-7ce12302d613/import/person_test_incr.csv
/home/vboxuser/.config/Neo4j Desktop/Application/relate-data/dbmss/dbms-b739dc1f-d763-4964-aca1-7ce12302d613/import/touchpoint_incr_test.csv
Relationships:
/home/vboxuser/.config/Neo4j Desktop/Application/relate-data/dbmss/dbms-b739dc1f-d763-4964-aca1-7ce12302d613/import/relationships_incr_test.csv
/home/vboxuser/.config/Neo4j Desktop/Application/relate-data/dbmss/dbms-b739dc1f-d763-4964-aca1-7ce12302d613/import/relationships1_incr_test.csv
Available resources:
Total machine memory: 7.464GiB
Free machine memory: 570.2MiB
Max heap memory : 910.5MiB
Max worker threads: 2
Configured max memory: 319.9MiB
High parallel IO: true
WARNING Import failed. The store files in /home/vboxuser/.config/Neo4j Desktop/Application/relate-data/dbmss/dbms-b739dc1f-d763-4964-aca1-7ce12302d613/data/databases/neo4j are left as they are, although they are likely in an unusable state. Starting a database on these store files will likely fail or observe inconsistent records so start at your own risk or delete the store manually.
org.neo4j.cli.CommandFailedException: Error importing csv file.
at org.neo4j.importer.ImportCommand$Base.doExecute(ImportCommand.java:464)
at org.neo4j.importer.ImportCommand$Incremental.execute(ImportCommand.java:645)
at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:92)
at org.neo4j.cli.AbstractCommand.call(AbstractCommand.java:37)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at org.neo4j.cli.AdminTool.execute(AdminTool.java:94)
at org.neo4j.cli.AdminTool.main(AdminTool.java:82)
Caused by: org.neo4j.importer.CsvImporter$CsvImportException: java.lang.IllegalStateException: Couldn't find a matching index for (:person {personId})
at org.neo4j.importer.CsvImporter.andPrintError(CsvImporter.java:339)
at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:264)
at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:183)
at org.neo4j.importer.ImportCommand$Base.doExecute(ImportCommand.java:454)
... 13 more
Caused by: java.lang.IllegalStateException: Couldn't find a matching index for (:person {personId})
at org.neo4j.util.Preconditions.checkState(Preconditions.java:210)
at com.neo4j.internal.batchimport.ParallelIncrementalBatchImporter.findLikelyIndex(ParallelIncrementalBatchImporter.java:2829)
at com.neo4j.internal.batchimport.ParallelIncrementalBatchImporter.copyIndexFilesFromTargetDatabase(ParallelIncrementalBatchImporter.java:2756)
at com.neo4j.internal.batchimport.ParallelIncrementalBatchImporter.prepare(ParallelIncrementalBatchImporter.java:362)
at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:230)
... 15 more
Csv file structures used for incremental load:
person_test_incr.csv:
personId:ID(person){label:person},email,phone,:LABEL
110001,abc@email110001,9999110001,person
110002,abc@email110002,9999110002,person
110003,abc@email110003,9999110003,person
110004,abc@email110004,9999110004,person
110005,abc@email110005,9999110005,person
touchpoint_incr_test.csv:
touchpointId:ID(touchpoint){label:touchpoint},product,:LABEL
t110001,prd110001,touchpoint
t110002,prd110002,touchpoint
t110003,prd110003,touchpoint
t110004,prd110004,touchpoint
t110005,prd110005,touchpoint
relationships_incr_test.csv:
:START_ID(person),:END_ID(person),email_similarity,phone_similarity,:TYPE
110001,110015,87.8,99,matched
110002,110016,89.9,93.2,matched
110003,110017,98.1,89.8,matched
110004,110018,99,95,matched
110005,110019,81.8,85.9,matched
relationships1_incr_test.csv:
:START_ID(person),:END_ID(touchpoint),:TYPE
110001,t110001,bought
110002,t110002,bought
110003,t110003,bought
110004,t110004,bought
110005,t110005,bought
Have also created index on personid and touchpointid after base load.