def getOrCreate( id, type ) { def p = g.V().has('internal_id',id) return (p.hasNext()) ? p.next() : graph.addVertex(T.label, type, 'some_id', id)}
new File('../data/sample-file.dat').text.eachLine { line -> def (id, label, key, value, etl_date) = line.split(/:/).toList() def vertex = getOrCreate(id, label) vertex.property(key, value) g.V(vertex).properties(key).property('etl_date',etl_date)}
--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/417ae7a4-3958-4ea7-a626-9ed235ed404c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/CA%2Bf9seUj0%3DSFpGa2sdDF5Va-EJvdP70k4Kx0Ugf32cQt826HzQ%40mail.gmail.com.