How do I import large JSON datasets that reference objects via a unique identifier other than Dgraphs uid
?
Let’s say I have multiple employees
that work_for
a company ABC
:
{
"name": "Alice",
"works_for": "ABC"
},
{
"name": "Bob",
"works_for": "ABC"
}
...
{
"name": "ABC",
"is_company": "true"
}
Neither this, nor
{
"name": "Alice",
"works_for": {
"name": "ABC",
"is_company": "true"
}
},
{
"name": "Bob",
"works_for": {
"name": "ABC",
"is_company": "true"
}
}
...
Will give me the correct result (i.e. both edges pointing to the same node/uid).
I hope there is a way to resolve this via some id function or something?