I'm trying to LOAD my first CSV file via the Desktop browser.
My first line, LOAD CSV WITH HEADERS FROM file:///T00_ITEM_35.csv AS LINE
(I have back ticks surrounding the file:/// reference but they are not showing in the post)
gives me an error stating that I have an undefined variable and points to the first back tick before the file:/// reference.
I tried single and double quotes (some examples use double quotes for the file) but I then get an error stating Invalid Input ' " ': expected whitespace, comment or an expression.
I have the file located in the Input folder and I have not changed the default Input file location in the settings so I should not need to specify any folders.
Store your csv at the imports folder. Say your file name is File.csv and in the file you have one column name Employee ID and you want to create a node with Label as Person and its property as Employee ID Number.
LOAD CSV with headers FROM 'file:///File.csv' AS F1
Create (pe:Person {Employee ID Number : F1.Employee ID})
Yes, that appears to be true.
The Import folder that I'm looking at is in the "installation-3.5.12" folder and is accompanied by folders; bin, certificates, confidential, data, lib, logs, metrics, plugins and run.
Here is the error (I simplified the file name);
Variable file:///3511.csv not defined (line 1, column 28 (offset: 27))
"LOAD CSV WITH HEADERS FROM file:///3511.csv AS LINE"
Invalid input '‘': expected whitespace, comment or an expression (line 1, column 28 (offset: 27))
"LOAD CSV WITH HEADERS FROM ‘file:///3511.csv’ AS LINE"
I know what's happening now. I'm copying code from Word.
I need to be editing this code in an ASCI editor.
I knew it had to be something ridiculously simple!!!
OK. Here's what I'm trying to do.
I have a log file that I have cleaned in Excel and exported to a csv.
I want to CREATE a Person node and fill-in a Name property and a T_ID property.
I also want to create a Relationship called "Connected_To" and create another node called "Course" and fill-in a Name property for it.
The CSV file has 4 columns with headers named; Time, Name, Event, IP_Addr.
Here is my error:
Variable line not defined (line 2, column 25 (offset: 83))
"CREATE (a:Person {Name: line.Name, T_ID:T00} )-[r:Connected_To]->(b:Course {Name: 3511})"