I have an integer-value that I want to be saved as a string-value in Neo4j using Cypher.
LOAD CSV WITH HEADERS FROM 'file:///nodes-addresses.csv' AS line
CREATE (:Address line[0], address: line[1], name: line[2], countries: line[3], countries_codes: line[4], sourceID: line[5], valid_until: line[6], note: line[7]})
I've looked through the Cypher manual and found toString
but this is still throwing an error.
Neo.ClientError.Statement.SyntaxError
Type mismatch: map key must be given as String, but was Integer (line 2, column 42 (offset: 108))
"CREATE (:Address {node_id: toString(line[0]), address: line[1], name: line[2], countries: line[3], countries_codes: line[4], sourceID: line[5], valid_until: line[6], note: line[7]})"
I've adding a character in and outside of the toString
and other examples or commands.
toString('x'+line[0])
, 'x'+toString(line[0])
, toStr(line[0])
But none have worked.
How am I supposed to convert a integer to a string on import?