SQL to Dgraph Migration - Edges not creating

The correct key to use is “uid” in order to the XIDS and mapping to work.

e.g:

{
    "uid" : "_:00004178-a951-4425-a260-40e548189169",
    "author_id" : "00004178-a951-4425-a260-40e548189169",
    "full_name" : "Joe Johnson",
	"dgraph.type" : "Author"
}
{		
    "uid" : "_:d6d30b03-27cf-4156-8b63-0218ff69a2bc",
	"book_id" : "d6d30b03-27cf-4156-8b63-0218ff69a2bc",
	"title" : "Awesome Book Title",
    "date" : "2018-10-11",
	"dgraph.type" : "Book"
}

and then

{
    "uid": "_:00004178-a951-4425-a260-40e548189169",
    "authored": {
		"uid": "_:d6d30b03-27cf-4156-8b63-0218ff69a2bc"
	}
}
1 Like