Loading schema/data into Dgraph (running in docker) from file (in Windows folder), automatically

That is because you have mounted directory on local disk, so that data persists between destroying the in-memory running container. You would need to purge the data files as well to get a clean new environment. When you load the data twice, you get new set of nodes.

Also I did try just the pure RDF as toy_data.rdf and it work as expected with live loader:

dgraph live -f toy_data.rdf -s toy.schema -a alpha:9080 -z zero:5080

The RDF:

_:michael <name> "Michael" .
_:michael <dgraph.type> "Person" .
_:michael <age> "39" .
_:michael <owns_pet> _:bark .
_:michael <friend> _:luke .

_:luke <name> "Luke" .
_:luke <dgraph.type> "Person" .
_:luke <age> "77" .
_:luke <owns_pet> _:meow .
_:luke <friend> _:Michael .

_:bark <name> "Bark" .
_:bark <dgraph.type> "Dog" .
_:bark <breed> "Great Dane" .

_:meow <name> "Meow" .
_:meow <dgraph.type> "Cat" .
_:meow <breed> "Siamese" .
1 Like