Giter Site home page Giter Site logo

Comments (7)

szeke avatar szeke commented on July 22, 2024

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 .ttl --outputfile
--dbtype MySQL --hostname xxx.edu --username pedro --password
szekely --portnumber 3306 --dbname mydb --tablename mytable" &> xxx.log

You must execute this command in your Web-Karma installation directory. I
think you just need to substitute the --tablename value.

BTW, next week we will release an upgrade to the RDF generation that works
almost 100 times faster and can generate about 1M triples per minute.

Thanks for using Karma

Pedro

On Fri, Oct 25, 2013 at 3:57 AM, FrenkT [email protected] wrote:

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


Reply to this email directly or view it on GitHubhttps://github.com//issues/39
.

from web-karma.

FrenkT avatar FrenkT commented on July 22, 2024

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

from web-karma.

szeke avatar szeke commented on July 22, 2024

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.

from web-karma.

FrenkT avatar FrenkT commented on July 22, 2024

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.(WorksheetR2RMLJenaModelParser.java:107)
at edu.isi.karma.rdf.DatabaseTableRDFGenerator.generateRDFFromWorksheet(DatabaseTableRDFGenerator.java:148)
at edu.isi.karma.rdf.DatabaseTableRDFGenerator.generateRDF(DatabaseTableRDFGenerator.java:135)
at edu.isi.karma.rdf.OfflineRdfGenerator.main(OfflineRdfGenerator.java:204)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:724)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.454s
[INFO] Finished at: Sun Oct 27 12:52:48 CET 2013
[INFO] Final Memory: 20M/210M
[INFO] ------------------------------------------------------------------------

from web-karma.

szeke avatar szeke commented on July 22, 2024

Thx for the stack trace. We will take a look.

from web-karma.

dkapoor avatar dkapoor commented on July 22, 2024

Issue fixed and pushed to development branch

from web-karma.

szeke avatar szeke commented on July 22, 2024

Pushed to master.

from web-karma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.