Neo4j-admin incremental import fails

When I run an incremental import on the Neo4j Community Edition using the following command:

../bin/neo4j-admin database import incremental neo4j --force  --overwrite-destination --skip-bad-relationships --skip-duplicate-nodes --multiline-fields --array-delimiter="|" @args.txt

I get this error:

Unmatched arguments from index 2: 'incremental', 'neo4j', '--force', '--overwrite-destination', '--skip-bad-relationships', '--skip-duplicate-nodes', '--multiline-fields', '--array-delimiter=|', '--nodes=State=header_State_n.csv,State.*_n.csv', '--nodes=City=header_City_n.csv,City.*_n.csv', '--nodes=Symptom=header_Symptom_n.csv,Symptom.*_n.csv', '--nodes=Patient=header_Patient_n.csv,Patient.*_n.csv', '--nodes=Disease=header_Disease_n.csv,Disease.*_n.csv', '--nodes=MetaNode=MetaNode_n.csv', '--relationships=LOCATED_IN=header_City-LOCATED_IN-State_r.csv,City-LOCATED_IN-State.*_r.csv', '--relationships=DIAGNOSED_WITH=header_Patient-DIAGNOSED_WITH-Disease_r.csv,Patient-DIAGNOSED_WITH-Disease.*_r.csv', '--relationships=LIVES_IN=header_Patient-LIVES_IN-City_r.csv,Patient-LIVES_IN-City.*_r.csv', '--relationships=SHOWS=header_Patient-SHOWS-Symptom_r.csv,Patient-SHOWS-Symptom.*_r.csv', '--relationships=PRESENTS=header_Disease-PRESENTS-Symptom_r.csv,Disease-PRESENTS-Symptom.*_r.csv', '--relationships=MetaRelationship=MetaRelationship_r.csv'```

What does: "Unmatched arguments from index 2" mean and how can if fix it?

The sequence of your argument is wrong, refer to the operation manual to fix it.

Thanks, I moved the database name to the end:

../bin/neo4j-admin database import incremental --verbose  --force  --skip-bad-relationships --skip-duplicate-nodes --multiline-fields --array-delimiter="|"   @args.txt neo4j

but I'm still getting the same error.

@pwrose

Do you know what Neo4j version?

neo4j-community-5.12.0

@pwrose

thank you
in your update of

Thanks, I moved the database name to the end:

../bin/neo4j-admin database import incremental --verbose  
--force  --skip-bad-relationships --skip-duplicate-nodes --multiline-fields 
--array-delimiter="|"   @args.txt neo4j


but I'm still getting the same error.

what does @args.txt represent?

args.txt contains the information about the node and relationship files. Here is the content of that file. The @args.txt just inserts this content to the command line.

 --nodes=State=header_State_n.csv,State.*_n.csv --nodes=City=header_City_n.csv,City.*_n.csv --nodes=Symptom=header_Symptom_n.csv,Symptom.*_n.csv --nodes=Patient=header_Patient_n.csv,Patient.*_n.csv --nodes=Disease=header_Disease_n.csv,Disease.*_n.csv --nodes=MetaNode=MetaNode_n.csv --relationships=LOCATED_IN=header_City-LOCATED_IN-State_r.csv,City-LOCATED_IN-State.*_r.csv --relationships=DIAGNOSED_WITH=header_Patient-DIAGNOSED_WITH-Disease_r.csv,Patient-DIAGNOSED_WITH-Disease.*_r.csv --relationships=LIVES_IN=header_Patient-LIVES_IN-City_r.csv,Patient-LIVES_IN-City.*_r.csv --relationships=SHOWS=header_Patient-SHOWS-Symptom_r.csv,Patient-SHOWS-Symptom.*_r.csv --relationships=PRESENTS=header_Disease-PRESENTS-Symptom_r.csv,Disease-PRESENTS-Symptom.*_r.csv --relationships=MetaRelationship=MetaRelationship_r.csv

Interestingly, the full import works just fine with this command line:

../bin/neo4j-admin database import full --overwrite-destination --skip-bad-relationships --skip-duplicate-nodes --multiline-fields --array-delimiter="|" @args.txt neo4j

Are you using --overwrite with incremental ? I'm not sure of the behavior of overwrite but what if you can not use it with incremental ? Overwrite means starting over which in a sens is the opposite of incremental

Yeah, I noticed that. I took out the --overwrite-destination for the incremental import and I'm still getting the same error. I have also upgraded to neo4j-community-5.15.0, but it doesn't make a difference.

getting the same error, did you fix the problem?

from the import directory I ran a full import instead of the incremental update:

neo4j_admin database import full <NEO4J_DATABASE> --overwrite-destination --skip-bad-relationships --skip-duplicate-nodes --multiline-fields --array-delimiter='|' @args.txt"

Please have a look at this Google Colab Notebook that creates a Neo4j Community edition instance and then loads data into it.