Hey guys,
I got all data converted from CSV format to JSON format and I tried to begin loading. When i use this command, it seems like nothing works:
curl -H "Content-Type: application/rdf" "localhost:8080/mutate?commitNow=true" -XPOST --data-binary @jsonfile.json
But if i copy-paste a portion of the file into ratel and run it as a mutation on there, it works fine???
Here is a sample object in the file:
{
"set": [
{
"Commentid": 1236950581249,
"creationDate": "2011-08-17T14:26:59.961+0000",
"locationIP": "92.39.58.88",
"browserUsed": "Chrome",
"content": "yes",
"length": 3,
"dgraph.type": "Comment"
},
After I successfully mutate the graph using ratel, I’m unable to even query for the data points I just created. I’ve tried adding a Comment type and querying for all Comment types, and also querying for has “Commentid”, which should have been loaded since I was returned with a success message.
Query is simple enough:
{
q(func: type(Comment) {
expand(_all_)
}
}
TLDR; 1. Am i loading the json files correctly?
2. Is creating types a must?
Thanks,
Kevin