R2rml mapping in Stardog Studio or converter

Hi!

Since I use protege/ontop to define mappings, I have an r2rml file for my postgres database, which I wanted to use in Stardog Studio to no avail, since it only accepts SMS2. Is there a way import an r2rml file to a database in a Stardog Free account, or to convert an r2rml file to SMS2?

Thank you in advance!

Best regards,

Attila Horváth

Hi. You can use R2RML files for import. In Studio, create you PostgreSQL data source, then use the stardog-admin CLI to create the virtual graph. This is off the top of my head but it's something like (check the docs)

stardog-admin virtual add --format R2RML [graph name].properties [R2RML file].ttl

Thank you very much, I did not know that I could use the CLI on other than the local install :slight_smile: I did as you suggested, and got a funny error message:

Expected ], found '©' [L26]

although there is no such character in the mapping .ttl file.

This is the command I entered:

stardog-admin --server https://sd-f0b3808c.stardog.cloud:5820 virtual add -d stif -f r2rml -n vkg -s aws mbh_mini_ontologia_prov_101-mapping.ttl

If I leave out the mapping file from the command, then Stardog creates the virtual graph no problem. The "-v" option did not really give any meaningful addition to the error message. Is there a way to somehow get to the bottom of this, because I don't really get what the problem is.

Thank you in advance if you can help me out here!

Oh, I just found the solution, Stardog just doesn't like accented characters in IRIs, so removing an "é" just did the trick!

Thank you once again!

1 Like