How to get mapping info in R2RML instead of SMS

I am using stardog cloud free and I really like what I saw up to now.
When exporting, the mapping info of the virtual graphs are exported in SMS format.
Is it possible to extract it in r2rml as well?
Up to now I only found an option to extract it using the CLI, but as I understood, this is not available with the free account in the cloud, correct?
Any help would be appreciated.

Hi Andreas,

Glad your having a good experience. What you have discovered is correct - there is no way to obtain the mappings in R2RML format in Studio. The best way to do that is to use the CLI.You should be able to obtain the CLI by following this link: Install from Zip | Stardog Documentation Latest


Hi Paul,
thanks for your reply. Is it possible to install stardog without a license and that way use the CLI for stardog cloud free? Having read the documentation, I am not really sure.

You can use the client portion of the install without a license file. You would point the CLI to the cloud instance, which is licensed.


Is it possible, that extracting r2rml is only possible with stardog-admin and that this cli command is not available for stardog cloud free?

If you use the same user that created the virtual graph, I can't see why the CLI shouldn't work. I'm assuming you have a password, but you can go into the :lock: security tab of Stardog Studio to set one. You should also see that your user has read permission for the VG, or for all rersources (the default for the account that created the account). Then, you want something like:

stardog-admin --server virtual mappings -u -p PaulsSecretPa$$ -v -f r2rml paulsvg

The -v will give a better error message if it doesn't work.


Hi Paul, it may be an issue with my installation. Here is the error message when trying to run stardog-admin, below also my java version. What am I doing wrong?

Thanks Andreas

It looks like your version of Java is too recent for Stardog, which requires version 11.


Hi Paul, with Java 11 it is working now. Thanks for your help Andreas

Excellent. I neglected to ask - what is your interest in having the mappings in R2RML format?


Hi Paul, I would like to use the metadata generated from stardog. I am thinking about using sparql to query the metadata, thats why I wanted to use the standard. Regards, Andreas

That's interesting. Have you looked at the built-in knowledge catalog? It's a database like any other, named catalog, that Stardog updates with data source metadata, including virtual graph mappings. I'd be interested to know whether that meets your needs or not.


Hi Paul, this looks really interesting, thanks for the hint. Andreas

1 Like