<p dir="auto">I used the neo4j-admin command to import the csv file to initialize the database, but an exception occurred when I executed the command. The exception message indicates that the <strong>:TYPE</strong> column is a empty value, but I checked all the csv files, and no empty value was found.</p>
<p dir="auto"><strong>Neo4j Version:</strong> 4.3.2-enterprise<br>
<strong>Operating System:</strong> RHEL7 (physical server)<br>
<strong>JDK:</strong> 11.0.12, Name:OpenJDK 64-Bit Server VM, Vendor:Red Hat, Inc</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">Imported successfully</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">I'm getting the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="WARNING Import failed. The store files in /opt/neo4j-enterprise-4.3.2/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
java.lang.IllegalArgumentException: org.neo4j.internal.kernel.api.exceptions.schema.IllegalTokenNameException: '' is not a valid token name. Token names cannot be empty or contain any null-bytes.
    at org.neo4j.internal.batchimport.store.BatchingTokenRepository.getOrCreateId(BatchingTokenRepository.java:94)
    at org.neo4j.internal.batchimport.store.BatchingTokenRepository.getOrCreateId(BatchingTokenRepository.java:76)
    at org.neo4j.internal.batchimport.RelationshipImporter.type(RelationshipImporter.java:155)
    at org.neo4j.internal.batchimport.input.InputEntity.replayOnto(InputEntity.java:354)
    at org.neo4j.internal.batchimport.input.csv.EagerCsvInputChunk.next(EagerCsvInputChunk.java:45)
    at org.neo4j.internal.batchimport.input.csv.CsvInputChunkProxy.next(CsvInputChunkProxy.java:75)
    at org.neo4j.internal.batchimport.ExhaustingEntityImporterRunnable.run(ExhaustingEntityImporterRunnable.java:57)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
    at org.neo4j.internal.helpers.NamedThreadFactory$2.run(NamedThreadFactory.java:110)
Caused by: org.neo4j.internal.kernel.api.exceptions.schema.IllegalTokenNameException: '' is not a valid token name. Token names cannot be empty or contain any null-bytes.
    at org.neo4j.internal.kernel.api.TokenWrite.checkValidTokenName(TokenWrite.java:139)
    at org.neo4j.internal.batchimport.store.BatchingTokenRepository.getOrCreateId(BatchingTokenRepository.java:90)
    ... 12 more    "><pre class="notranslate"><code class="notranslate">WARNING Import failed. The store files in /opt/neo4j-enterprise-4.3.2/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
java.lang.IllegalArgumentException: org.neo4j.internal.kernel.api.exceptions.schema.IllegalTokenNameException: '' is not a valid token name. Token names cannot be empty or contain any null-bytes.
    at org.neo4j.internal.batchimport.store.BatchingTokenRepository.getOrCreateId(BatchingTokenRepository.java:94)
    at org.neo4j.internal.batchimport.store.BatchingTokenRepository.getOrCreateId(BatchingTokenRepository.java:76)
    at org.neo4j.internal.batchimport.RelationshipImporter.type(RelationshipImporter.java:155)
    at org.neo4j.internal.batchimport.input.InputEntity.replayOnto(InputEntity.java:354)
    at org.neo4j.internal.batchimport.input.csv.EagerCsvInputChunk.next(EagerCsvInputChunk.java:45)
    at org.neo4j.internal.batchimport.input.csv.CsvInputChunkProxy.next(CsvInputChunkProxy.java:75)
    at org.neo4j.internal.batchimport.ExhaustingEntityImporterRunnable.run(ExhaustingEntityImporterRunnable.java:57)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
    at org.neo4j.internal.helpers.NamedThreadFactory$2.run(NamedThreadFactory.java:110)
Caused by: org.neo4j.internal.kernel.api.exceptions.schema.IllegalTokenNameException: '' is not a valid token name. Token names cannot be empty or contain any null-bytes.
    at org.neo4j.internal.kernel.api.TokenWrite.checkValidTokenName(TokenWrite.java:139)
    at org.neo4j.internal.batchimport.store.BatchingTokenRepository.getOrCreateId(BatchingTokenRepository.java:90)
    ... 12 more    
</code></pre></div>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">The header being like</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ID,Address,_source_id,_target_id,:START_ID,:END_ID,:TYPE"><pre class="notranslate"><code class="notranslate">ID,Address,_source_id,_target_id,:START_ID,:END_ID,:TYPE
</code></pre></div>
<p dir="auto">The data being like</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="XXXXXXXX1,&quot;#12-11 XXXX XXXXX XXXX XXXXX, XXXXX XXXXX&quot;,XXXXXXXX1,&quot;#12-11 XXXX XXXXX XXXX XXXXX, XXXXX XXXXX&quot;,XXXXXXXX1,&quot;#12-11 XXXX XXXXX XXXX XXXXX, XXXXX XXXXX&quot;,Address
XXXXXXXX2,&quot;#35-00 XXXX XXXXX XXXX XXXXX, XXXXX XXXXX&quot;,XXXXXXXX2,&quot;#35-00 XXXX XXXXX XXXX XXXXX, XXXXX XXXXX&quot;,XXXXXXXX2,&quot;#35-00 XXXX XXXXX XXXX XXXXX, XXXXX XXXXX&quot;,Address"><pre class="notranslate"><code class="notranslate">XXXXXXXX1,"#12-11 XXXX XXXXX XXXX XXXXX, XXXXX XXXXX",XXXXXXXX1,"#12-11 XXXX XXXXX XXXX XXXXX, XXXXX XXXXX",XXXXXXXX1,"#12-11 XXXX XXXXX XXXX XXXXX, XXXXX XXXXX",Address
XXXXXXXX2,"#35-00 XXXX XXXXX XXXX XXXXX, XXXXX XXXXX",XXXXXXXX2,"#35-00 XXXX XXXXX XXXX XXXXX, XXXXX XXXXX",XXXXXXXX2,"#35-00 XXXX XXXXX XXXX XXXXX, XXXXX XXXXX",Address
</code></pre></div>
<p dir="auto">Command used like:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="neo4j-admin import --database=neo4j --multiline-fields=true --skip-bad-relationships=true --skip-duplicate-nodes=true --nodes import/tmp0dxbylxm.csv,import/tmp7e7712_l.csv --relationships import/tmpagndf1k5.csv,import/tmp51gid3pj.csv,import/tmpb669w63v.csv"><pre class="notranslate"><code class="notranslate">neo4j-admin import --database=neo4j --multiline-fields=true --skip-bad-relationships=true --skip-duplicate-nodes=true --nodes import/tmp0dxbylxm.csv,import/tmp7e7712_l.csv --relationships import/tmpagndf1k5.csv,import/tmp51gid3pj.csv,import/tmpb669w63v.csv
</code></pre></div>
<h3 dir="auto">Additional information</h3>
<p dir="auto">Sorry that the original data cannot be provided for security reasons.<br>
I can be sure that the type column in the csv is not empty, but there will be spaces between words.<br>
All csv is generated based on the to_csv method of the pandas library in python.<br>
<code class="notranslate">dataframe.to_csv(temp_file, sep=',', header=True, index=False, encoding='utf-8', quotechar='"')</code><br>
I will be very appreciate if you can provide more information that may cause the exception.</p>
<h3 dir="auto">Environment</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="neo4j-enterprise-3.4.1-windows.zip &amp; neo4j-enterprise-3.4.4-windows.zip
neo4j.conf
    dbms.memory.heap.initial_size=5g
    dbms.memory.heap.max_size=5g
    dbms.memory.pagecache.size=7g
    # dbms.directories.import=import
PC:  Surface Pro 4
OS:  Microsoft Windows 10 Professional 64bit 10.0.15063 
CPU: Intel(R) Core(TM) i7-6650U CPU @ 2.20GHz 2208Mhz, 2 cores, 4 logic processors
HD:  1 TB SSD + 1 TB SSD
RAM: 16 GB 
Data Source:
    https://snap.stanford.edu/data/twitter-2010.txt.gz
    twitter-2010.txt.gz (5,501,785,223 bytes, 1,468,365,182 lines)"><pre class="notranslate"><code class="notranslate">neo4j-enterprise-3.4.1-windows.zip &amp; neo4j-enterprise-3.4.4-windows.zip
neo4j.conf
    dbms.memory.heap.initial_size=5g
    dbms.memory.heap.max_size=5g
    dbms.memory.pagecache.size=7g
    # dbms.directories.import=import
PC:  Surface Pro 4
OS:  Microsoft Windows 10 Professional 64bit 10.0.15063 
CPU: Intel(R) Core(TM) i7-6650U CPU @ 2.20GHz 2208Mhz, 2 cores, 4 logic processors
HD:  1 TB SSD + 1 TB SSD
RAM: 16 GB 
Data Source:
    https://snap.stanford.edu/data/twitter-2010.txt.gz
    twitter-2010.txt.gz (5,501,785,223 bytes, 1,468,365,182 lines)
</code></pre></div>
<h3 dir="auto">Steps to reproduce</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Step 0:
    CREATE CONSTRAINT ON (person:Person) ASSERT person.id IS UNIQUE

Step 1: (did complete in 8,210,673 ms)
    USING PERIODIC COMMIT 1000
    LOAD CSV FROM &quot;file:///C:/poc/import/twitter-2010.txt.gz&quot; AS line FIELDTERMINATOR ' '
    WITH DISTINCT toInt(line[0]) as id
    MERGE (n:Person {id:id})
    ON CREATE
    SET n.name = toString(id),
        n.sex = [&quot;Male&quot;, &quot;Female&quot;][(id % 2)],
        n.age = (id % 50) + 15,
        n.country = [&quot;China&quot;, &quot;U.S.A&quot;, &quot;France&quot;, &quot;Britain&quot;, &quot;Russia&quot;, &quot;Canada&quot;, &quot;Germany&quot;, &quot;Japan&quot;, &quot;Italy&quot;][(id % 9)]

Step 2: (did complete in 3,803,455 ms)
    USING PERIODIC COMMIT 1000
    LOAD CSV FROM &quot;file:///C:/poc/import/twitter-2010.txt.gz&quot; AS line FIELDTERMINATOR ' '
    WITH DISTINCT toInt(line[1]) as id
    MERGE (n:Person {id:id})
    ON CREATE
        SET n.name = toString(id),
        n.sex = [&quot;Male&quot;, &quot;Female&quot;][(id % 2)],
        n.age = (id % 50) + 15,
        n.country = [&quot;China&quot;, &quot;U.S.A&quot;, &quot;France&quot;, &quot;Britain&quot;, &quot;Russia&quot;, &quot;Canada&quot;, &quot;Germany&quot;, &quot;Japan&quot;, &quot;Italy&quot;][(id % 9)]

Step 3: (didn't complete even after 2 days or longer with no error report either)
    USING PERIODIC COMMIT 1000
    LOAD CSV FROM &quot;file:///C:/poc/import/twitter-2010.txt.gz&quot; AS line FIELDTERMINATOR ' '
    WITH toInt(line[0]) as id, toInt(line[1]) as id1
    MATCH (n:Person {id:id}), (n1:Person {id:id1})
    MERGE (n)-[r:FOLLOWS]-&gt;(n1)
    ON CREATE
    SET r.degree = (id+id1)%100"><pre class="notranslate"><code class="notranslate">Step 0:
    CREATE CONSTRAINT ON (person:Person) ASSERT person.id IS UNIQUE

Step 1: (did complete in 8,210,673 ms)
    USING PERIODIC COMMIT 1000
    LOAD CSV FROM "file:///C:/poc/import/twitter-2010.txt.gz" AS line FIELDTERMINATOR ' '
    WITH DISTINCT toInt(line[0]) as id
    MERGE (n:Person {id:id})
    ON CREATE
    SET n.name = toString(id),
        n.sex = ["Male", "Female"][(id % 2)],
        n.age = (id % 50) + 15,
        n.country = ["China", "U.S.A", "France", "Britain", "Russia", "Canada", "Germany", "Japan", "Italy"][(id % 9)]

Step 2: (did complete in 3,803,455 ms)
    USING PERIODIC COMMIT 1000
    LOAD CSV FROM "file:///C:/poc/import/twitter-2010.txt.gz" AS line FIELDTERMINATOR ' '
    WITH DISTINCT toInt(line[1]) as id
    MERGE (n:Person {id:id})
    ON CREATE
        SET n.name = toString(id),
        n.sex = ["Male", "Female"][(id % 2)],
        n.age = (id % 50) + 15,
        n.country = ["China", "U.S.A", "France", "Britain", "Russia", "Canada", "Germany", "Japan", "Italy"][(id % 9)]

Step 3: (didn't complete even after 2 days or longer with no error report either)
    USING PERIODIC COMMIT 1000
    LOAD CSV FROM "file:///C:/poc/import/twitter-2010.txt.gz" AS line FIELDTERMINATOR ' '
    WITH toInt(line[0]) as id, toInt(line[1]) as id1
    MATCH (n:Person {id:id}), (n1:Person {id:id1})
    MERGE (n)-[r:FOLLOWS]-&gt;(n1)
    ON CREATE
    SET r.degree = (id+id1)%100
</code></pre></div>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Step 0, 1, 2 proves to be successful where step 1 took  8,210,673 ms, step 2 took 3,803,455 ms, but step 3 <strong>didn't complete even after 2 days or longer with no error report either</strong>.</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">Step 3 are exprected to be complete within a few hrs or within a day max and if not it should at least generating an error report.</p>
<h3 dir="auto">Log Files</h3>
<p dir="auto"><a href="https://github.com/neo4j/neo4j/files/2211038/debug.log">debug.log</a><br>
<a href="https://github.com/neo4j/neo4j/files/2211039/security.log">security.log</a></p>