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.