I’m bulk-loading data into d-graph for an external source, as is. There’s a literal that uniquely identifies each node. Let’s call it “name”. Each node has a “name”. Some nodes (10% of the total) have a literal “targetName” that specifies “name” of another node to which do I need to create a “target” edge.
This is how I do it right now:
- Bulk load the data.
- Query for all nodes and return their "name"s and uids.
- Externally create a uid to “name” hash
- Query for all nodes (with a has(targetName) filter)
- Create the N-quad for each mutation, one at a time (using the hash, “name” and “targetName”)
- Live-load the generated RDF
Currently Step 2 here is killing my efficiency by orders of magnitude, and it is pretty redundant and suboptimal to go about. Is there a native dgraph functionality that can help me achieve this?
Given that I’m maintaining the uniqueness of “name” externally anyway, if I can use it as an xid identifier for live load mutations, that’ll be tremendously helpful but I’m not sure if XIDs serve that purpose.