Live Load JSON Mutations

mutation

(Ramith) #1

Is there a way to live-load JSON mutations?

The docs did not seem to indicate it. Is bulk-loading the only way to get JSON support for large number of mutations?

For bulk loading there seems to be a --jsons flag. Live loading does not reveal such a flag.

Thanks.


(Michel Conrado) #2

I think next RC you gonna be able to do it. Or maybe next version 1.1

You can use a client like dgraph-js to load JSON.

Also you can try my project of CLI (still alpha version) https://github.com/MichelDiz/Dgraph-Digger-CLI. Just install it by cloning the repo and build and “yarn link”. Then you can do
digger live --json ./pathToJSON/family.json


(Ramith) #3

Does the live loader do anything more intelligent than just making a whole load of sequential requests?

Would I “lose” something by moving to just using a client?


(Michel Conrado) #4

Well, if you’re asking about Dgraph’s Live Loader. It does a lot of things. Like (if you use right) balance the load. Do checks in types. Retry the transaction. You can set the size of the batch and so on.

I didn’t get the question. But yeah, if you use a client you have to deal with the whole load yourself.


(Ramith) #5

I guess I was looking for the specific features the live loader handles for me.

You have helped explain that, so thanks!


(Daniel Mai) #6

Live Loader will support loading data in JSON format in v1.1.

Live Loader itself uses the Dgraph Go client, (dgo), meaning that it runs Dgraph transactions the same way as any other client would, so technically any client can do what Live Loader does.