Closed FrenkT closed 10 years ago
Hi,
The offline mode supports using a single model to generate RDF from multiple table. Here is an example invocation.
mvn exec:java -Dexec.mainClass="edu.isi.karma.rdf.OfflineRdfGenerator"
-Dexec.args="--sourcetype DB --modelfilepath
I'm using that invocation, and it usually works. The problem is that in the R2RML file there is some reference to the name of the table that I used to generate it, for example in my model I can see entries like this: km-dev:sourceName "DB1" : rr:tableName "DB1"
I think that this makes me get an error if I call the offline RDF generation with --tablename DB2 , even if DB2 has the same columns as DB1. This is the error: edu.isi.karma.webserver.KarmaException: Resource not found in model for the source: DB2
We will try to replicate the problem. The idea is that the command line parameter should override the rr:tableName, and looks like this is not working properly.
Can you post the full stack trace of the error so we can be sure we are replicating your error.
This is the terminal message and error. The table park_replica exists and i replaced all the table reference in the R2RML with another name.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ISI Karma Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) @ webkarma >>>
[INFO]
[INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) @ webkarma <<<
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ webkarma ---
Loading the R2RML model file...done
Generating RDF...
ERROR edu.isi.karma.rdf.OfflineRdfGenerator.main() - Error occured while generating RDF!
edu.isi.karma.webserver.KarmaException: Resource not found in model for the source: park_replica
at edu.isi.karma.kr2rml.WorksheetR2RMLJenaModelParser.
Thx for the stack trace. We will take a look.
Issue fixed and pushed to development branch
Pushed to master.
Hi, I'm currently creating an R2RML model from karma web UI, publishing it and using it to periodically generate RDF in batch mode. My problem is that in the R2RML contains some reference about the name of the MySQL table that I used to generate it, but I would like to use it with tables that have different names but still the same content. For example, I published the model using a table named "sensors1", I would like to use the R2RML to publish RDF of a table named "sensors2" that has the same columns as "sensors1". Is this possible to to this? Maybe using some regular expressions in the R2RML? Thanks