obda-mixer

obda-mixer v1.2.0

obda-mixer is a maven project born with the intent of testing OBDA systems. This version (1.2.0) can interact with the OBDA system through three different modalities:

Rationale

obda-mixer runs a set of SPARQL queries (query mix) over an OBDA system. A typical query is an instance of a SPARQL query template, where a SPARQL query template is a SPARQL query with placeholders. Such templates will be instantiated by obda-mixer at runtime with values taken from a database of choice. For instance, a query with placeholders is:

PREFIX npdv: <http://sws.ifi.uio.no/vocab/npd-v2#>

SELECT DISTINCT ?licenceURI ?interest ?date
WHERE {
    ?licenceURI a npdv:ProductionLicence .
    		
    [ ] a npdv:ProductionLicenceLicensee ;
      	npdv:dateLicenseeValidFrom ?date ;
      	npdv:licenseeInterest ?interest ;
      	npdv:licenseeForLicence ?licenceURI .   
   FILTER(?date > "${1:licence_licensee_hst.prlLicenseeDateValidFrom:none}"^^xsd:date)	
}

In the query above, the placeholder is ${1:licence_licensee_hst.prlLicenseeDateValidFrom:none}. At runtime, obda-mixer instantiates this placeholder with values from the column prlLicenseeDateValidFrom in table licence_licensee_hst.

A possible instantiation of the query template above is:

PREFIX npdv: <http://sws.ifi.uio.no/vocab/npd-v2#>

SELECT *
WHERE {
  [ npdv:productionYear ?year ;
    npdv:productionMonth ?m ;
    npdv:producedGas     ?g ;
    npdv:producedOil     ?o 
 ]
 FILTER (?year > 2008) 
 FILTER(?m >= 1 && ?m <= 12 )
} 

In this way, it is possible to instantiate the same queries in many different ways, so as to reduce the impact of caching on the measured execution times (useful for cold-run analyses).

First Steps

See Build and Run the Mixer.

Contribute by Extending the Java API Interface!!

The Java API interface is currently implemented for the Ontop system. To implement your own interface for an OBDA system of your choice, refer to How To Instantiate the Mixer Interface with an OBDA System through the Java API