dgraph bulk --jsons="./json/loader.json" -s loader.schema
and many more combinations…
But every time it would return the same error: “Data path() does not exist”
On checking the source code, it seems that “jsons” option is not handled properly and “jsonDir” path is never checked, and only rdfDir is checked. This seems to be one probable reason for this.
Hey, Chirag
I was facing same error!
But at that time I have done one mistake that I have started alpha and ratel first and then loaded bulk loader but for bulk loader steps are like
1 you have to start dgraph zero
2 Bulk loader
3 run dgraph alpha
4 Ratel
You can try this from scratch and your 2nd combination
This will work successfully,I suppose.
And whenever you want to start from scratch just delete \p and \w directory and then load command again. This worked for me.
Just like you suggested, I deleted \p and \w directory first.
Then started Dgraph zero and ran the bulk load command, but encountered the same error again, “Data path() does not exist”
By Bulk loader (Step 2 in your previous reply), what do you mean? The command or something else?
Even tried running, by keeping it at the same level and followed the steps as in your first reply.
Still no luck!
Also, what exactly is expected in the --http param? Just rechecking it with you.
Are you sure the bulk load works properly for JSON(–jsons)?
Because when trying the rdf command(-r), it never gives me the “Data path() does not exist” error
Not sure. Because when I tried second time it didn’t work[but there was a need to clean my dataset also…so…I don’t know an exact error] and I shifted to use rdf.
Yes…with rdf it works fine.
@MichelDiz May be you know better than me. As I have just started with this!
Port of your local host where you load your console.
Well the issue was that the user was using Dgraph installed globally. But He was trying to use a local binary. I think this happens because the global binary lost his path context. Not sure about this, but happend only on some Linux Dist.
Use the flag --cwd to set your path manually on Dgraph.
If not so, share your version. Tell-me if you installed it by script or binary or docker or something else. Check “whoami” to see if you have rights.
let me know if it works.
Update
–cwd doesn’t exist in some binaries. If you need it build Dgraph from master (but pay attention that master isn’t ready to regular use. Due it’s in constant development).
Other possible mistake is when the user has Dgraph installed globally and really wanna use a local binary (build or downloaded). So in this case you have to start Dgraph as ./dgraph bulk right in the exact path that the bin exists and also the JSON.
This would indicate that the bulk command can’t find the data file “loader.json”. It expects to find it in the same directory dgraph bulk is running from.
Also, which version of dgraph are you using? You can find out by running dgraph version.