Fixing explorer - no results no class - for sms2 cars example

There is a nice 4 year old cars example at stardog-examples/examples/cli/virtual/csv at develop · stardog-union/stardog-examples · GitHub

Unfortunately version 10 - explorer is showing only:

No results - for schema visualization click
No class - in the upper right hand

It would be nice to get up-to-date code examples that include:

  • necessary mydb props changes
  • step by step on how to create the cars-model.ttl
  • any other config changes to the explorer

So that explorer can show in colors schema, nodes with correct classes, and relationships.

Hi,

in order to visualize the data in Explorer, you also need to load the VSO ontology referenced in the example to your database. You can download the ontology here.

Afterwards, you can add it as a named graph to the database and set it as the schema. For example, assuming you downloaded the RDF/XML version (ns.owl):

stardog-admin db create --name mydb
stardog-admin virtual import --format sms2 mydb cars_mappings.sms cars.csv
stardog data add mydb ns.owl -g tag:stardog:api:context:schema

Then you should be able to see the model and instance data in Explorer:

You can also enable reasoning in Explorer to see the instances as Vehicle as well.

Best regards

Lars

Where can I download the ns.owl file? The link above is for specification.

Thank you that helps.

Lars,

mydb is a database in in my free cloud instance.
For this command:

stardog --server https://***.stardog.cloud:5820 data add mydb ns.owl -g tag:stardog:api:context:schema -u *** -p ***

I am getting the following error:

Unknown command --server
The detailed stack trace for the error is:
java.lang.UnsupportedOperationException: Unknown command --server
at io.airlift.command.Help.help(Help.java:130)
at io.airlift.command.Help.help(Help.java:59)
at io.airlift.command.Help.run(Help.java:34)
at io.airlift.command.Help.call(Help.java:40)
at io.airlift.command.Help.call(Help.java:18)
at com.complexible.stardog.cli.CLIBase.execute(CLIBase.java:56)
at com.complexible.stardog.cli.CLI.main(CLI.java:121)

The --server option is not valid for the stardog CLI. You should use:

stardog data add https://***.stardog.cloud:5820/mydb ns.owl -g tag:stardog:api:context:schema -u *** -p ***

Ok - that helped paint a better colored schema.

Still if I try to visualize a specific node I am getting No Class - see screenshot below:

Right, the class Offering is not defined in the VSO ontology but in the GoodRelations ontology. You can download the GoodRelations ontology here and add it to your database, the same way you added the VSO ontology, i.e.:

stardog data add https://***.stardog.cloud:5820/mydb v1.owl -g tag:stardog:api:context:schema -u *** -p ***

Best regards
Lars

Lars - thank you - that works just fine!