title: How to include properties with NULL values using Neo4j MERGE
body: <p>I have a Node table and an Edge table, both available as CSV files.
  I managed to load the Node table by:</p>
  
  <pre><code>USING PERIODIC COMMIT
  LOAD CSV WITH HEADERS FROM 'file:///NodesETL.csv' AS line
  CREATE (:InfoNodes {id: toString(line.id), description: toString(line.description)})
  </code></pre>
  
  <p>This query creates the InfoNodes with the field values of the CSV file as properties of :InfoNodes which is fine.</p>
  
  <p>InfoNodes have relationships with other InfoNodes, e.g. these relationships exists between Nodes with the same label.
  These relationships are stored in an Edge table available as an additional CSV file.
  Every row of this Edge table holds idfrom and idto fields that defines the relationships between InfoNodes on basis of their id property.
  The Edge table holds also 3 additional fields representing properties of the relationship. The firstproperty is always a string and never NULL e.g. never an empty string. The secondproperty and thirdproperty, both type string, can have NULL values like "". So secondproperty and/or thirdproperty can contain NULL values.
  I try to use this Edge table to create the [:RELATIONSHIP {firstproperty:, secondproperty:, thirdproperty:}] relationships between (:InfoNodes) by:</p>
  
  <pre><code>USING PERIODIC COMMIT
  LOAD CSV WITH HEADERS FROM 'file:///EdgesETL.csv' AS line
  MATCH (from:InfoNodes{id: toString(line.idfrom)})
  MATCH (to:InfoNodes{id: toString(line.idto)})
  MERGE (from)-[:RELATION {firstproperty: toString(line.firstproperty), secondproperty: toString(line.secondproperty), thirdproperty: toString(line.thirdproperty)}]-&gt;(to)
  </code></pre>
  
  <p>This second Cypher script results into an error when secondproperty and thirdproperty in the Edge table contain NULL values.
  The Neo4j error message is: Cannot merge relationship using null property value for secondproperty.
  When I remove from the second script the secondproperty field and secondproperty: property than the same type of error occurs mentioning thirdproperty: Cannot merge relationship using null property value for thirdproperty
  When I remove secondproperty and thirdproperty fields and properties from the previous script then the [:RELATIONS] relationships between InfoNodes are created including firstproperty table fields stored as firstproperty: property of the [:RELATION] relationship.</p>
  
  <p>Question: How to extend the second script in order to load from the Edge table the second property and thirdproperty fields into secondproperty: and thirdproperty: of [:RELATION] relationships including NULL values?</p>
  
  <p><a href="https://stackoverflow.com/questions/37081842/cant-merge-with-null-values-cannot-merge-node-using-null-property-value-in-n">Can&#39;t MERGE with null values; &#39;Cannot merge node using null property value&#39; in neo4j</a> describes the same problem but doesn't answer my question in case of multiple fields/properties with NULL values. </p>