title: Create Neo4j database using CSV files
body: <p>I have 2 <code>CSV</code> files which I want to convert into a <code>Neo4j</code> database. They look like this:</p>
  
  <p>first file:</p>
  
  <pre><code>name,enzyme
  Aminomonas paucivorans,M1.Apa12260I
  Aminomonas paucivorans,M2.Apa12260I
  Bacillus cellulosilyticus,M1.BceNI
  Bacillus cellulosilyticus,M2.BceNI
  
  second file 
  
  name,motif
  Aminomonas paucivorans,GGAGNNNNNGGC
  Aminomonas paucivorans,GGAGNNNNNGGC
  Bacillus cellulosilyticus,CCCNNNNNCTC
  </code></pre>
  
  <p>As you can see the common factor is the <code>Name</code> of the organism and the. Each <code>Organism</code> will have a few <code>Enzymes</code> and each <code>Enzyme</code> will have 1  <code>Motif</code>. <code>Motifs</code> can be same between enzymes . I used the following statement to create my database:</p>
  
  <pre><code>USING PERIODIC COMMIT
  LOAD CSV WITH HEADERS FROM "file1.csv" AS csvLine
  MATCH (o:Organism { name: csvLine.name}),(e:Enzyme { name: csvLine.enzyme})
  CREATE (o)-[:has_enzyme]-&gt;(e) //or maybe CREATE UNIQUE?
  
  USING PERIODIC COMMIT
  LOAD CSV WITH HEADERS FROM "file2.csv" AS csvLine
  MATCH (o:Organism { name: csvLine.name}),(m:Motif { name: csvLine.motif})
  CREATE (o)-[:has_motif]-&gt;(m) //or maybe CREATE UNIQUE?
  </code></pre>
  
  <p>This gives me errors on the very first line at <code>USING PERIODIC COMMIT</code> which says <code>Invalid input 'S': expected</code>. If I get rid of ti, the next error I get is <code>WITH is required between CREATE and LOAD CSV (line 6, column 1)
  "MATCH (o:Organism { name: csvLine.name}),(m:Motif { name: csvLine.motif})"</code> . I googled this issue which led me to this <a href="https://stackoverflow.com/questions/22755289/cypher-query-load-csv-not-responding-in-neo4j-2-1">answer</a> . I tried the answer given ther (refreshing the browser cache) but the problem persists. WHat am I doing wrong here? Is the query correct? Is there an another solution to this issue? Any help will be greatly appreciated</p>