datacequia / go-dogg3rz

Decentralized Knowledge Orchestration Tool
Apache License 2.0
8 stars 1 forks source link

dogg3rz create namedgraph does not work when specifying --parent with valid parent #24

Closed adpadilla closed 3 years ago

adpadilla commented 3 years ago

First, I created a named graph (mygraph2) using this command w/o the --parent option so it would be created within the default graph. This works. Then I attempted to create a new named graph (mysubgraph) within the new named graph(mygraph2) .

Here are the commands:

Andrews-MacBook-Pro:go-dogg3rz andrew$ dogg3rz create namedgraph --dataset ds1 mygraph2
Andrews-MacBook-Pro:go-dogg3rz andrew$ dogg3rz create namedgraph --dataset ds1 --parent mygraph  mysubgraph
NotFound: Graph node found in Graph: mygraph
NotFound: Graph node found in Graph: mygraph

Here is the json-ld doc for dataset ds1

Andrews-MacBook-Pro:ds1 andrew$ cat .document.jsonld |json_pp
{
   "@graph" : [
      {
         "@type" : "rdfs:Class",
         "@id" : "class1"
      },
      {
         "prop1" : "value1",
         "@id" : "_:67f75094-aa9c-4782-adbf-92af6cef97e7",
         "prop2" : "value2"
      },
      {
         "@graph" : [],
         "@id" : "mygraph"
      },
      {
         "@id" : "mygraph2",
         "@graph" : []
      }
   ],
   "__dgrz_mtimes__" : {
      "f94256b03d73a0daec9154870c341fbaa7a6fb23d78ed53db8e78464db2997e2" : 1615169446136109000,
      "9dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2" : 1615168824200321000,
      "ae1522dd824ace9b4c1ebbf691e5f34a7d140b950826e1b5962dfe576831b22b" : 1615168851976866000,
      "25dfd29c09617dcc9852281c030e5b3037a338a4712a42a21c907f259c6412a0" : 1615169626216442000
   },
   "@context" : {
      "adp" : "http://www.adp.com/"
   }
}
adpadilla commented 3 years ago

expected argument for flag `--dataset', but got option `--parent'
Andrews-MacBook-Pro:go-dogg3rz andrew$ dogg3rz create namedgraph --dataset   ds1 ngChild
Andrews-MacBook-Pro:go-dogg3rz andrew$ dogg3rz create namedgraph 
the required flag `--dataset' was not specified
Andrews-MacBook-Pro:go-dogg3rz andrew$ dogg3rz create namedgraph --datasset ds1
unknown flag `datasset'
Andrews-MacBook-Pro:go-dogg3rz andrew$ dogg3rz create namedgraph --dataset ds1
the required argument `GRAPH_NAME` was not provided
Andrews-MacBook-Pro:go-dogg3rz andrew$ dogg3rz create namedgraph --dataset ds1 --parent ng1  ngChild
NotFound: Parent Graph node found in Graph: ng1
NotFound: Parent Graph node found in Graph: ng1
Andrews-MacBook-Pro:go-dogg3rz andrew$ cat ~/.dogg3rz/data/repositories/test1/ds1/.document.jsonld |json_pp
{
   "@context" : {},
   "__dgrz_mtimes__" : {
      "9dcf97a184f32623d11a73124ceb99a5709b083721e878a16d78f596718ba7b2" : 1615747586999132000,
      "25dfd29c09617dcc9852281c030e5b3037a338a4712a42a21c907f259c6412a0" : 1615747586999132000,
      "c73a232121e32688a394d2c8afbc98aadddaf9e0ee07cf58e7453fed720ef303" : 1616983398332464000
   },
   "@graph" : [
      {
         "attr" : "value2",
         "attr1" : "value1",
         "@id" : "_:7b4eed18-c715-45f3-8be9-8bce74202332"
      },
      {
         "@type" : "rdfs:Class",
         "@id" : "mytype1"
      },
      {
         "@id" : "ng1",
         "@graph" : []
      }
   ]
}
Andrews-MacBook-Pro:go-dogg3rz andrew$ dogg3rz create namedgraph --dataset ds1 --parent ng1  ngChild
NotFound: Parent Graph node found in Graph: ng1
NotFound: Parent Graph node found in Graph: ng1
Andrews-MacBook-Pro:go-dogg3rz andrew$ ```
bhallamp commented 3 years ago

Please try this again, its working for me.

adpadilla commented 3 years ago

I'll try again.

adpadilla commented 3 years ago

tried again and it works. looking at my previous sequences of commands it seems I may have used wrong parent named graph name.