I’m using Live uploader data files to dgraph.
- It works fine if I pass full path to data files it works
- I get “No data files found” error, if I pass directory path to --files as value
As per docs link, passing directory should work.
Can someone help here?
- Put all gzip data files in a local c:\dgraph directory
- On my local windows machine, start dgraph latest container
docker run -ti --add-host host.docker.internal:host-gateway --network host -v c:\dgraph:/root/dgraph --name dgraph dgraph/dgraph:latest dgraph zero
- port forward zero and alpha to cloud
# On new terminal zero loadbalancer kubectl port-forward svc/dgraph-dgraph-zero 5080:5080 -n dgraph # On new terminal zero loadbalancer kubectl port-forward svc/dgraph-dgraph-alpha 9080:9080 -n dgraph
- Connect to the local dgraph container
# get container_id by running docker ps -a docker exec -it <container_id> /bin/sh
- Run dgraph, pass folder path to --files parameter
dgraph live --files /root/dgraph/upload/ --schema /root/dgraph/schema/Person.rdf --alpha host.docker.internal:9080 --zero host.docker.internal:5080 --format=rdf --upsertPredicate "xid" #Notice this will fail with below error Dgraph version : v21.12.0 Dgraph codename : zion Dgraph SHA-256 : 078c75df9fa1057447c8c8afc10ea57cb0a29dfb22f9e61d8c334882b4b4eb37 Commit SHA-1 : d62ed5f15 Commit timestamp : 2021-12-02 21:20:09 +0530 Branch : HEAD Go version : go1.17.3 jemalloc enabled : true For Dgraph official documentation, visit https://dgraph.io/docs. For discussions about Dgraph , visit https://discuss.dgraph.io. For fully-managed Dgraph Cloud , visit https://dgraph.io/cloud. Licensed variously under the Apache Public License 2.0 and Dgraph Community License. Copyright 2015-2021 Dgraph Labs, Inc. Running transaction with dgraph endpoint: host.docker.internal:9080 Processing schema file "/root/dgraph/schema/Person.rdf" Processed schema file "/root/dgraph/schema/Person.rdf" No data files found in /root/dgraph/upload
- If I run the step #5 by passing explicit data file name instead of directory, it works fine.