Neo4j-etl admin database import problems

Hi everyone,

I've been trying to import bulk data into Neo4j 5.8.0 DB with neo4j-admin database import command. But there is something I want to ask.

With 'neo4j-admin database import full' command, I'm able to import my data with no problem. But when I need to add some extra data to my database, I use 'neo4j-admin database import incremental' command. With the 'incremental' command, I get an error about the ID column in the header. Which says : "Import error: No label was specified for the node index in ':ID(Mrsmap)'". I don't know why it causes an error with 'incremental' command while it works fine with the 'full' command

I've attached a screenshot of my header file to give you an idea.

Here's my full command :
neo4j-admin database import incremental --nodes=import/mrsmap_header.csv,import/mrsmap.csv --relationships=import/mrrel_rel_header.csv,import/mrrel_rel.csv --force neo4j

Here's my full error:
Import error: No label was specified for the node index in 'ID:ID(umls.mrsmap)'
Caused by:No label was specified for the node index in 'ID:ID(umls.mrsmap)'
java.lang.IllegalStateException: No label was specified for the node index in 'ID:ID(umls.mrsmap)'
at org.neo4j.util.Preconditions.checkState(Preconditions.java:195)
at org.neo4j.internal.batchimport.input.csv.CsvInput.lambda$collectReferencedNodeSchemaFromHeader$12(CsvInput.java:401)
at java.base/java.util.Optional.ifPresent(Optional.java:178)
at org.neo4j.internal.batchimport.input.csv.CsvInput.collectReferencedNodeSchemaFromHeader(CsvInput.java:398)
at org.neo4j.internal.batchimport.input.csv.CsvInput.referencedNodeSchema(CsvInput.java:384)
at com.neo4j.internal.batchimport.ParallelIncrementalBatchImporter.prepare(ParallelIncrementalBatchImporter.java:360)
at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:239)
at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:182)
at org.neo4j.importer.ImportCommand$Base.doExecute(ImportCommand.java:392)
at org.neo4j.importer.ImportCommand$Incremental.execute(ImportCommand.java:549)
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)

Hello ozanbicer
Checking this page, I see a section specially for incremental import. Could that be that you need to put :ID(label:Mrsmap)?

When using incremental import, you must have node property uniqueness constraints in place for the property key and label combinations that form the primary key, or the uniquely identifiable nodes. For example, importing nodes with a Person label that are uniquely identified with a uuid property key, the format of the header should be uuid:ID{label:Person}.

I've specified the label such as ID:ID{label:Mrsmap}

But this time I get an error that says 'Label 'Mrsmap' for node index specified in 'ID:ID{label:Mrsmap} does not exist'

This error doesn't make much sense to me. As I understand, It's looking for the label 'Mrsmap' before importing Mrsmap nodes.

Full error:
java.lang.IllegalStateException: Label 'Mrsmap' for node index specified in 'ID:ID{label:Mrsmap}' does not exist
at org.neo4j.util.Preconditions.checkState(Preconditions.java:195)
at org.neo4j.internal.batchimport.input.csv.CsvInput.lambda$collectReferencedNodeSchemaFromHeader$12(CsvInput.java:406)
at java.base/java.util.Optional.ifPresent(Optional.java:178)
at org.neo4j.internal.batchimport.input.csv.CsvInput.collectReferencedNodeSchemaFromHeader(CsvInput.java:398)
at org.neo4j.internal.batchimport.input.csv.CsvInput.referencedNodeSchema(CsvInput.java:384)
at com.neo4j.internal.batchimport.ParallelIncrementalBatchImporter.prepare(ParallelIncrementalBatchImporter.java:360)
at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:239)
at org.neo4j.importer.CsvImporter.doImport(CsvImporter.java:182)
at org.neo4j.importer.ImportCommand$Base.doExecute(ImportCommand.java:392)
at org.neo4j.importer.ImportCommand$Incremental.execute(ImportCommand.java:549)
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)

Do you also have a constraint on this ID?
See here for examples

Oh, it worked after the constraint. For some reason, I've assumed that it would be the same with full import. Now I see incremental import takes a little bit more effort. I'm glad to be able to clarify the problem. Thanks for your help @XavPil !!