It's very easy to do this from the Gremlin terminal. Assume you have
a simple edge file called edges.txt that has this data in it:
1,2
2,3
3,4
1,4
Start Gremlin and do:
gremlin> g = new TinkerGraph()
==>tinkergraph[vertices:0 edges:0]
gremlin> vs=[] as Set;new
File("edges.txt").eachLine{l->p=l.split(",");vs<<p[0];vs<<p[1];}
==>1
==>2
==>3
==>4
gremlin> vs.each{v->g.addVertex(v)}
==>1
==>2
==>3
==>4
gremlin> new File("edges.txt").eachLine{l->p=l.split(",");g.addEdge(g.getVertex(p[0]),g.getVertex(p[1]),'friend')}
gremlin> g.E
==>e[3][1-friend->4]
==>e[2][3-friend->4]
==>e[1][2-friend->3]
==>e[0][1-friend->2]
That's it. You might find this blog post useful if you're pulling
data from different sources into Gremlin in an ad-hoc way:
http://thinkaurelius.com/2013/02/04/polyglot-persistence-and-query-with-gremlin/
Best regards,
Stephen
On Sat, Feb 16, 2013 at 11:43 AM, <
dajoh...@gmail.com> wrote:
> After a fair bit of googling, I can't find a straightforward way to take a
> .CSV file and convert it into a Tinkerpop graph. I expect some configuration
> is necessary, but can I do this ingestion without adding a bunch of
> third-party layers to the stack?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Gremlin-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
gremlin-user...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>