I find that when importing data into the graph from a DB or any format in which I have a relationships as column keys, I have the need to create Edges using these keys which are already properties in the vertex.
How can I go through all Vertices creating Edges by using these FKs that I already ingested into the graph?
And I need this to be doable programmatically, because I have a lot of data where this step is required. Currently I'm using Gremlin.Net because the majority of the code I use is already C#
Example: Imagine I have ingested some customers
g.addV('customer').property('id', c_id).property('product', product_id)
And some products
g.addV('product').property('id', product_id)
I want to create edges like: costumer[bought-> project] How can I use the ids to create edges? I can't seem to be able to reference a property in the context of its vertex.
I want to do something like:
g.V.hasLabel('customer').as('c').addE('bought').to(g.V(c.product))
Obviously I cannot do c.product, and if there is any solution using loops, sadly it's out of the question since Cosmos Graph does not support it.
So far I've been resorting to looping in C# but even my sample data is not scalable.