<p dir="auto">It seems that when I attempt to set a node's labels using PUT, if the label already exists I'll just re-add it. I've also managed to get a 500 error and a temporary hang, but I haven't fully explored what conditions cause those. This is 2.0.0-M06, installed from homebrew, running on OS X 10.8.5.</p>
<p dir="auto">With a fresh database, I get the following behaviour:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl -i -X POST localhost:7474/db/data/node
HTTP/1.1 201 Created
Location: http://localhost:7474/db/data/node/1
&lt;...&gt;

$ curl -H 'Content-Type: application/json' -X PUT -d '[&quot;Test&quot;]' localhost:7474/db/data/node/1/labels
$ curl localhost:7474/db/data/node/1/labels; echo
[ &quot;Test&quot; ]

$ curl -H 'Content-Type: application/json' -X PUT -d '[&quot;Test&quot;]' localhost:7474/db/data/node/1/labels
$ curl localhost:7474/db/data/node/1/labels
[ &quot;Test&quot;, &quot;Test&quot; ]"><pre class="notranslate"><code class="notranslate">$ curl -i -X POST localhost:7474/db/data/node
HTTP/1.1 201 Created
Location: http://localhost:7474/db/data/node/1
&lt;...&gt;

$ curl -H 'Content-Type: application/json' -X PUT -d '["Test"]' localhost:7474/db/data/node/1/labels
$ curl localhost:7474/db/data/node/1/labels; echo
[ "Test" ]

$ curl -H 'Content-Type: application/json' -X PUT -d '["Test"]' localhost:7474/db/data/node/1/labels
$ curl localhost:7474/db/data/node/1/labels
[ "Test", "Test" ]
</code></pre></div>
<p dir="auto">POST doesn't add any more:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl -H 'Content-Type: application/json' -X POST -d '[&quot;Test&quot;]' localhost:7474/db/data/node/1/labels
$ curl localhost:7474/db/data/node/1/labels
[ &quot;Test&quot;, &quot;Test&quot; ]"><pre class="notranslate"><code class="notranslate">$ curl -H 'Content-Type: application/json' -X POST -d '["Test"]' localhost:7474/db/data/node/1/labels
$ curl localhost:7474/db/data/node/1/labels
[ "Test", "Test" ]
</code></pre></div>
<p dir="auto">But the way the two interact is strange:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl -H 'Content-Type: application/json' -X POST -d '[&quot;Test2&quot;]' localhost:7474/db/data/node/1/labels
$ curl localhost:7474/db/data/node/1/labels
[ &quot;Test&quot;, &quot;Test&quot;, &quot;Test2&quot; ]
$ curl -H 'Content-Type: application/json' -X PUT -d '[&quot;Test2&quot;]' localhost:7474/db/data/node/1/labels
$ curl localhost:7474/db/data/node/1/labels
[ &quot;Test&quot;, &quot;Test2&quot;, &quot;Test2&quot; ]"><pre class="notranslate"><code class="notranslate">$ curl -H 'Content-Type: application/json' -X POST -d '["Test2"]' localhost:7474/db/data/node/1/labels
$ curl localhost:7474/db/data/node/1/labels
[ "Test", "Test", "Test2" ]
$ curl -H 'Content-Type: application/json' -X PUT -d '["Test2"]' localhost:7474/db/data/node/1/labels
$ curl localhost:7474/db/data/node/1/labels
[ "Test", "Test2", "Test2" ]
</code></pre></div>
<p dir="auto">(One of the "Test"s is now a "Test2".)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl -i -H 'Content-Type: application/json' -X PUT -d '[&quot;Test2&quot;]' localhost:7474/db/data/node/1/labels
HTTP/1.1 500 Server Error
Content-Length: 0
Server: Jetty(9.0.5.v20130815)

$ curl localhost:7474/db/data/node/1/labels
[ &quot;Test2&quot;, &quot;Test2&quot; ]"><pre class="notranslate"><code class="notranslate">$ curl -i -H 'Content-Type: application/json' -X PUT -d '["Test2"]' localhost:7474/db/data/node/1/labels
HTTP/1.1 500 Server Error
Content-Length: 0
Server: Jetty(9.0.5.v20130815)

$ curl localhost:7474/db/data/node/1/labels
[ "Test2", "Test2" ]
</code></pre></div>
<p dir="auto">(Despite the 500 error, it seems to have worked.)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl -H 'Content-Type: application/json' -X PUT -d '[&quot;Test2&quot;]' localhost:7474/db/data/node/1/labels
(This hangs for a bit, but returns when I use the web interface to count the nodes.)
~$ curl localhost:7474/db/data/node/1/labels; echo
[ &quot;Test2&quot;, &quot;Test2&quot;, &quot;Test2&quot; ]"><pre class="notranslate"><code class="notranslate">$ curl -H 'Content-Type: application/json' -X PUT -d '["Test2"]' localhost:7474/db/data/node/1/labels
(This hangs for a bit, but returns when I use the web interface to count the nodes.)
~$ curl localhost:7474/db/data/node/1/labels; echo
[ "Test2", "Test2", "Test2" ]
</code></pre></div>
<p dir="auto">Aside: I actually ran all the PUT and POST requests with <code class="notranslate">-i</code>, but I edited that out for brevity's sake. Apart from the two that I left in, they all returned the same headers, and no content:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="HTTP/1.1 204 No Content
Access-Control-Allow-Origin: *
Server: Jetty(9.0.5.v20130815)"><pre class="notranslate"><code class="notranslate">HTTP/1.1 204 No Content
Access-Control-Allow-Origin: *
Server: Jetty(9.0.5.v20130815)
</code></pre></div>
<p dir="auto">Info:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ neo4j info
Neo4j Server is running at pid 41636
Using Java version: CurrentJDK
NEO4J_HOME:        /usr/local/Cellar/neo4j/2.0.0-M06/libexec
NEO4J_SERVER_PORT: 7474
NEO4J_INSTANCE:    /usr/local/Cellar/neo4j/2.0.0-M06/libexec
JAVA_HOME:         /Library/Internet-Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
JAVA_OPTS:         -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Dneo4j.ext.udc.source=homebrew
CLASSPATH:         /usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/concurrentlinkedhashmap-lru-1.3.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/geronimo-jta_1.1_spec-1.1.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/lucene-core-3.6.2.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-cypher-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-graph-algo-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-graph-matching-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-jmx-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-kernel-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-lucene-index-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-shell-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-udc-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/org.apache.servicemix.bundles.jline-0.9.94_1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/parboiled-core-1.1.6.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/parboiled-scala_2.10-1.1.6.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/scala-library-2.10.2.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/server-api-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/asm-3.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/bcprov-jdk16-140.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-beanutils-1.8.0.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-beanutils-core-1.8.0.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-collections-3.2.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-compiler-2.6.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-configuration-1.6.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-digester-1.8.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-io-1.4.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-lang-2.4.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-logging-1.1.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jackson-core-asl-1.9.7.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jackson-jaxrs-1.9.7.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jackson-mapper-asl-1.9.7.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/janino-2.6.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/javax.servlet-3.0.0.v201112011016.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jcl-over-slf4j-1.6.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jersey-core-1.9.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jersey-multipart-1.9.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jersey-server-1.9.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-http-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-io-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-security-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-server-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-servlet-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-util-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-webapp-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-xml-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jsr311-api-1.1.2.r612.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/logback-access-1.0.9.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/logback-classic-1.0.9.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/logback-core-1.0.9.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/mimepull-1.6.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/neo4j-browser-0.1.21.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/neo4j-server-2.0.0-M06-static-web.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/neo4j-server-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/rhino-1.7R3.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/rrd4j-2.0.7.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/slf4j-api-1.6.2.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/conf/"><pre class="notranslate"><code class="notranslate">$ neo4j info
Neo4j Server is running at pid 41636
Using Java version: CurrentJDK
NEO4J_HOME:        /usr/local/Cellar/neo4j/2.0.0-M06/libexec
NEO4J_SERVER_PORT: 7474
NEO4J_INSTANCE:    /usr/local/Cellar/neo4j/2.0.0-M06/libexec
JAVA_HOME:         /Library/Internet-Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
JAVA_OPTS:         -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Dneo4j.ext.udc.source=homebrew
CLASSPATH:         /usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/concurrentlinkedhashmap-lru-1.3.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/geronimo-jta_1.1_spec-1.1.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/lucene-core-3.6.2.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-cypher-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-graph-algo-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-graph-matching-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-jmx-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-kernel-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-lucene-index-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-shell-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/neo4j-udc-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/org.apache.servicemix.bundles.jline-0.9.94_1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/parboiled-core-1.1.6.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/parboiled-scala_2.10-1.1.6.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/scala-library-2.10.2.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/lib/server-api-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/asm-3.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/bcprov-jdk16-140.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-beanutils-1.8.0.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-beanutils-core-1.8.0.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-collections-3.2.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-compiler-2.6.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-configuration-1.6.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-digester-1.8.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-io-1.4.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-lang-2.4.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/commons-logging-1.1.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jackson-core-asl-1.9.7.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jackson-jaxrs-1.9.7.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jackson-mapper-asl-1.9.7.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/janino-2.6.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/javax.servlet-3.0.0.v201112011016.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jcl-over-slf4j-1.6.1.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jersey-core-1.9.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jersey-multipart-1.9.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jersey-server-1.9.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-http-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-io-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-security-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-server-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-servlet-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-util-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-webapp-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jetty-xml-9.0.5.v20130815.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/jsr311-api-1.1.2.r612.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/logback-access-1.0.9.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/logback-classic-1.0.9.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/logback-core-1.0.9.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/mimepull-1.6.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/neo4j-browser-0.1.21.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/neo4j-server-2.0.0-M06-static-web.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/neo4j-server-2.0.0-M06.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/rhino-1.7R3.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/rrd4j-2.0.7.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/system/lib/slf4j-api-1.6.2.jar:/usr/local/Cellar/neo4j/2.0.0-M06/libexec/conf/
</code></pre></div>
<p dir="auto">The generic problem: give a csv with columns a,b,c,..., when using apoc.load.csv , the yielded map does display it's content of<br>
map:{<br>
"a":"value a",<br>
"b":"value b",<br>
"c":"value c"<br>
}<br>
but when trying to access the value of "a"  directly (map['a']), it always returns null</p>
<p dir="auto">The issue has been confirmed by multiple people: <a href="https://community.neo4j.com/t/cannot-access-map-item-from-apoc-load-csv/25576" rel="nofollow">https://community.neo4j.com/t/cannot-access-map-item-from-apoc-load-csv/25576</a></p>
<p dir="auto">Whereas in the yielded map the first column is visible as part of the map attribute, accessing it always returns null.</p>
<p dir="auto">This being the content of my "taxonomy.CSV" file:</p>
<p dir="auto">Level1,Level2,Tree Path,Id,Code,Description,Long Description,Context,Type,Active,Code Valid from,Node Valid from,Node Valid to<br>
1,1,(Root Code),31102727,Zone,Zone,,TEST,Taxonomy,A,31/01/2020,,<br>
2,2,31085110,31085110,CAI,Asia,,TEST,Zone,A,4/8/2017,,<br>
by running<br>
CALL apoc.load.csv('taxonomy.csv') yield map return map,map['Id'],map['Tree Path'],map['Level1'],map['Level2'] limit 5</p>
<p dir="auto">I cannot access the values on the first column - they are always null.<br>
I've tried renaming the column -&gt; same (=null).<br>
I've duplicated the column, initially called "Level" and new it's Level1 and Level2 and Level2 can be access, but Level1 is always null</p>
<p dir="auto">Result (removed some content from map to make used fields more visible):</p>
<p dir="auto">map<br>
{<br>
"Tree Path": "(Root Code)",<br>
"Level2": "1",<br>
"Level1": "1",<br>
"Id": "31102727"<br>
}<br>
map['Id']	map['Tree Path']	map['Level1']	map['Level2']</p>
<p dir="auto">"31102727"	"(Root Code)"	null	"1"</p>