Antidot implementations of R2RML and Direct Mapping specifications
Clone or download
Failed to load latest commit information.

This DB2Triples modification (a) support Oracle Databases and (b) implements the language column feature.

The language column feature adds the property rr:languageColumn to the R2RML language. This property was first created by Vladimir Alexiev in his Perl implementation. Although the property was using other namespace, I maintained the R2RML namespace in db2triples.

H2 Database support by @santteegt (

Original project by @antidot (

LGPL Licence 2.1

Building jar

To build DB2Triples jar, you need to use Maven ( which will provide to you all the necessary package to compile. The classical way is the command:

mvn package

This will provide a file "db2triples-.jar" in the "target" directory according to default configuration of Maven.

Executing jar

You can also compile and execute directly the jar from Maven build. This operation requires to copy dependencies into working folder. Use following commands:

mvn dependency:copy-dependencies
java -cp target/dependency/*:target/db2triples-<version number>.jar net.antidot.semantic.rdf.rdb2rdf.main.Db2triples

When using Windows cmd, the separator for the classpath argument ':' is to be replaced by ';'.

The execution of this command will prompt its usage:

 -b,--database <database_name>        database name
 -d,--driver <driver>                 Driver to use (default :
                                      com.mysql.jdbc.Driver )
 -f                                   Force loading of existing repository
                                      (without remove data)
 -i,--base_uri <base_uri>             Base URI (default :
 -l,--url <url>                       Database URL (default :
 -m,--mode <mode>                     Mandatory conversion mode, 'r2rml'
                                      for R2RML and 'dm' for Direct
 -n,--native_output <nativeOutput>    Native store output directory
 -o,--output <output>                 Output RDF filename (default :
 -p,--pass <password>                 Database password
 -q,--sparql_output <sparql_output>   Transformed graph output file
                                      (optionnal if sparql option is not
                                      specified, default : sparql_output
 -r,--r2rml_file <r2rml_file>         R2RML config file used to convert
                                      relationnal database into RDF terms.
 -s,--sparql <sparql>                 Sparql transform request file
 -t,--format <format>                 RDF syntax output format ('RDFXML',
                                      'N3', 'NTRIPLES' or 'TURTLE')
 -u,--user <user_name>                Database user name
 -v,--version <version>               Version of norm to use (1 = Working
                                      Draft 20 September 2011 (default), 2
                                      = Working Draft 23 March 2011)

Usage example

java -cp target/dependency/*;target/db2triples-1.0.3-SNAPSHOT.jar net.antidot.semantic.rdf.rdb2rdf.main.Db2triples -m r2rml -r C:/r2rml-file.ttl -d oracle.jdbc.driver.OracleDriver -l jdbc:oracle:thin:@//some.url.and.its:port/ -u USERNAME -p PASSWORD -b database_name