3

We are currently working on a project involving an "ordinary" relational database, but we wish to enable SPARQL requests towards this database.

d2rq.org is a tool that enables SPARQL to be run towards the database with the help of a .ttl file which defines the database to RDF mapping.

This .ttl file can be built automatically with a D2RQ tool named "generate-mapping". http://d2rq.org/generate-mapping takes quite a few arguments, some preceeded with a single dash "-" and some double "--". My challenge is that any argument preceeded with a double dash generates this error:

Command:

./generate-mapping -u root -p password -o testmappingLocal.ttl --verbose jdbc:mysql:///iswc

Result:

Exception in thread "main" java.lang.IllegalArgumentException: Unknown argument: --verbose
    at jena.cmdline.CommandLine.handleUnrecognizedArg(CommandLine.java:215)
    at jena.cmdline.CommandLine.process(CommandLine.java:177)
    at d2rq.generate_mapping.main(generate_mapping.java:41)

Any help with the double-dash arguments will be greatly appreciated. OS: Ubuntu Linux, D2RQ version: 0.8

Jens Piegsa
  • 7,399
  • 5
  • 58
  • 106
K_scheduler
  • 101
  • 4
  • 1
    At first glance looks like a bug in the D2RQ tool. But `--verbose` is not really essential except to get some progress information while it's running. What happens if you just leave it out? – Jeen Broekstra Jun 19 '12 at 21:44
  • report it as a bug to the project – wikier Feb 15 '13 at 09:48

1 Answers1

1

D2rq and mysql database using generate mapping file & rdf files.

1).mapping file generate commands:

./generate-mapping -u root -p root -o /home/bigtapp/Documents/d2rqgenerate_mapping/mapfile.ttl jdbc:mysql://localhost:3306/d2rq

note: 1. root -p root -> mysql db username & password. 2. /home/bigtapp/Documents/d2rqgenerate_mapping/mapfile.ttl -> file save output path . 3.jdbc:mysql://localhost:3306 ->mysql driver. 4./d2rq ->database name. 2).the mapping file using RDF creation:

use following command.

The RDF syntax to use for output. Supported syntaxes are “TURTLE”, “RDF/XML”, “RDF/XML-ABBREV”, “N3”, and “N-TRIPLE” (the default). “N-TRIPLE” works best for large databases. command: ./dump-rdf -f RDF/XML -b localhost:3306 -o /home/bigtapp/Documents/d2rqgenerate_mapping/dumpfile.rdf /home/bigtapp/Documents/d2rqgenerate_mapping/mapfile.ttl.

apache-jena-fuseki create dataset then rdf file uploadserver then your using sparql query ..you get the result...