Teaching Stardog to chase its own tail

I was just messing around with the new BI SQL support and thought I'd share what I had done.

First a couple of lessons/observations. I know it's only in beta for now but the output from stardog-admin server status doesn't list the sql.server.enabled option so it's hard to tell if it's actually enabled or if you're just doing something wrong. I also realized that you can't connect to it using and admin account. That's probably a good thing but I kept thinking I just hadn't enabled it properly hence my first observation.

So I loaded the beatles.ttl dataset at stardog-tutorials/beatles.ttl at master · stardog-union/stardog-tutorials · GitHub and then registerd a simple named query.

select * where { ?album :a :Album; :name ?name; :date ?date; :artist ?artist; :track ?track} => test

then I added a virtual graph as a mysql against this query with auto-generated mappings

jdbc:mysql://localhost:5806/tailwag/test

Then queried with sparql

select * where { graph<virtual://tailwag> { ?s <http://api.stardog.com/tailwag#artist> ?p }}

and results! SPARQL => SQL => SPARQL woof!

Why would you ever want to do this? I'm not sure but I have some ideas. For right now just because it's cool. I'm willing to bet that SQL => SPARQL => SQL would work just fine too.

You can check the value of sql.server.enabled in the output of stardog-admin server metrics - running that will give you all of the server and database info. You can also run stardog-admin server metrics dbms.* which will give you just the server info (everything with a dbms. prefix is info for the whole server. server status is more of an overview function.

And thanks for sharing! Good to hear this is all working as expected.

Thanks. I had forgotten about the new metrics stuff and that command.

And I can report that the feature successfully works with MetaBase. At least it works with the minimal testing that I've done. Metabase is really slick and suuuuper easy easy to get started with. Just download the jar run java -jar metabase.jar , enter your connection info, and you're good to go. I haven't checked out all the features yet so I don't know how it compares to SuperSet.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.