Live Load JSON Mutations

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.

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) GitHub - MichelDiz/Dgraph-Digger-CLI: A simple CLI for Dgraph.. Just install it by cloning the repo and build and “yarn link”. Then you can do
digger live --json ./pathToJSON/family.json

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?

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.

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

You have helped explain that, so thanks!

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.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.