semantic-sql icon indicating copy to clipboard operation
semantic-sql copied to clipboard

Make semsql prefix maps configurable

Open matentzn opened this issue 3 years ago • 4 comments

matentzn avatar Aug 29 '22 15:08 matentzn

We definitely want to do this, in addition to using any shacl triple namespace declarations in the file itself

Currently this is a bit awkward as everything is coordinated via a Makefile

Our options are:

  1. add some parameterization to the Makefile, and pass this via the calling script
  2. bite the bullet and do #41 now, or at least switching out the rdftab part, which will make all this easier

cmungall avatar Aug 29 '22 17:08 cmungall

If we wanted to go with (1) here is the relevant section of the Makefile:

https://github.com/INCATools/semantic-sql/blob/36a3d83d626280f594ad0c19f56cc544887bfc99/src/semsql/builder/build.Makefile#L45-L56

You need to load the additional prefixes into the prefix table prior to calling rdftab, as rdftab takes care of contracting the URIs

But from our discussion on slack, it seems this is less of a priority as we will just merge the prefixes you need in to curated_prefixes

cmungall avatar Aug 29 '22 22:08 cmungall

but it's looking like direct loading with https://github.com/ozekik/lightrdf is easiest

cmungall avatar Aug 29 '22 22:08 cmungall

now possible with:

semsql make foo.db --prefix-csv-path /path/to/my/prefixes.csv

caveat: you must make sure ALL prefixes are in the csv, including owl, rdf, xsd, etc

the next release of oak will make this more transparent when querying owl via the sql adapter

cmungall avatar Mar 11 '23 02:03 cmungall