Koen, I think that you are looking for the MERGE command.
http://neo4j.com/docs/developer-manual/current/cypher/clauses/merge/ Later, Andy > On 21 Aug 2017, at 05:32, koen <[email protected]> wrote: > > In addition.. so if i would run a LOAD CSV twice in a row with exactly > the same file i would like nothing to happen to the nodes / rels (meaning no > creation of duplicate rels etc).. If i would run the import with almost the > same csv file (with only one property changed somewhere in the file ) only > that specific property would be updated in that specific node and nothing > would change to the other rels / nodes .. so what are the cypher statements > that make this happen .. > > Thanks Koen > > > > Op maandag 21 augustus 2017 06:22:12 UTC+2 schreef koen: > Hi, a generic question. Lets assume you import data from a CSV file into > neo4j using cypher "LOAD CSV". > The first/initial run will give you a full load of all nodes / properties > Lets assume this results in several node types each of them with several > properties and several relationships.. > > Now i have a new CSV file of the same format as the initial load one. In > this file some new records might have been added and for existing records > (nodes or rels) the properties might have been changed. > > My question .. what would be the best approach to process such "delta" import > .. > > 1) resolve the differences during pre-processing and generate a delte import > file .. > OR > 2) is there a clever way to write cypher code to import initial loads (which > is the straightforward part) and also verify at the same time if existing > nodes need to be updated when doing a delta import > > thanks > > Koen > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
