I have established a graph database using batch import tool for Neo4j. The data I am working on is generated every day so I need to update my graph database daily. Running the batch import is not a solution as it will clean and upload entire data everyday. I am trying to use the load csv cypher function using python to do so however I am not able to.
ex = USING PERIODIC COMMIT LOAD CSV FROM myfile.csv AS row FIELDTERMINATOR ';'
ex += MERGE(:a{b:row[0],d:row[1]})
I am trying to run this command using py2neo's as
graph = py2neo.Graph()
graph.cypher.execute(ex)
I get an error Invalid input 'G' : expected whitespace, comment, "...string..." or a parameter (line 1, column 37 (offset 36))
Using this link I understand that I have to look over the rows and then I can upload data using py2neo. https://codereview.stackexchange.com/questions/75842/optimizing-for-data-import-in-neo4j-using-py2neo
Is there a way to run load csv directly using python over an a csv? Writing look is not a problem however, this adds on to extra computation.
Thanks in advance for answers :)