Hi,
I am trying to read my CSV file which has spaces in column name: Column A = 'Source Variable'
When I am trying to read this, it gives me an error:
Neo.ClientError.Statement.SyntaxError: Invalid input 'V': expected whitespace, comment, '(', '.', node labels, '[', "=~", IN, STARTS, ENDS, CONTAINS, IS, '^', '*', '/', '%', '+', '-', '=', "<>", "!=", '<', '>', "<=", ">=", AND, XOR, OR, LOAD CSV, FROM, INTO, START, MATCH, UNWIND, MERGE, CREATE GRAPH >>, CREATE >> GRAPH, CREATE GRAPH, CREATE, SET, DELETE GRAPHS, DELETE, REMOVE, FOREACH, WITH, CALL, PERSIST, RELOCATE, RETURN, SNAPSHOT, UNION, ';' or end of input (line 4, column 23 (offset: 99)) "WHERE NOT line.Source Variable IS NULL and NOT line.SourceFile is NULL" ^
My code:
LOAD CSV WITH HEADERS FROM "file:///Matrix.csv" AS line WITH line
WITH line
WHERE NOT line.Source Variable IS NULL and NOT line.SourceFile is NULL
MERGE (a: Studytest {name: line.Studytest, type: 'Study'})
//CREATE (domain: Domain {name: line.Domain})
mergE (b: Domaintest {name: line.Domaintest, type: 'Domain', domain_identifier: line.Studytest + line.Domaintest})
Merge (c: SourceFile {name: line.SourceFile,type: 'Source_File', file_identifier: line.Studytest + line.Domaintest + line.SourceFile})
Merge (d: SourceVariable {name: line.Source Variable,type: 'Source_Variable', field_identifier: line.Studytest + line.Domaintest + line.SourceFile + line.Source Variable})
MERGE (d)-[z:Part_of]->(c)
MERGE (c)-[q:Part_of]->(b)
MERGE (b)-[p:Part_of]->(a)
RETURN a;