Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in rml:referenceFormulation ql:CSV #8

Open
jatoledo opened this issue Jun 22, 2020 · 4 comments
Open

Exception in rml:referenceFormulation ql:CSV #8

jatoledo opened this issue Jun 22, 2020 · 4 comments

Comments

@jatoledo
Copy link

Hi,
In RML, the logical source descriptions from CSV is:
rml:referenceFormulation ql:CSV

but this generates an Exception.

<#PersonMapping>
        rml:logicalSource [
                rml:source "/home/jtoledo/Desktop/BSBM/bsbmtools-0.2/dataset/45k/person.csv";
                rml:referenceFormulation ql:CSV
        ];
        rr:subjectMap [
                rr:template "http://example.com/{nr}";
                rr:class foaf:Person
        ];

Exception:

2020-06-22 20:01:37 INFO  Squerall:86 - ---> MAPPING CONSULTATION
2020-06-22 20:01:37 INFO  Squerall:51 - - Going to find datasources relevant to ?x...
2020-06-22 20:01:37 INFO  Squerall:100 - ...with the (Predicate,Object) pairs: Set((<http://xmlns.com/foaf/0.1/mbox_sha1sum>,?mbox), (<http://xmlns.com/foaf/0.1/name>,?name))
2020-06-22 20:01:37 INFO  Squerall:131 - ...for this, the following query will be executed: PREFIX rml: <http://semweb.mmlab.be/ns/rml#>PREFIX rr: <http://www.w3.org/ns/r2rml#>PREFIX foaf: <http://xmlns.com/foaf/spec/>PREFIX nosql: <http://purl.org/db/nosql#>SELECT distinct ?src ?type WHERE {?mp rml:logicalSource ?ls . ?ls rml:source ?src . ?ls nosql:store ?type . ?mp rr:predicateObjectMap ?pom0 . ?pom0 rr:predicate <http://xmlns.com/foaf/0.1/mbox_sha1sum> . ?pom0 rr:objectMap ?om0 . ?mp rr:predicateObjectMap ?pom1 . ?pom1 rr:predicate <http://xmlns.com/foaf/0.1/name> . ?pom1 rr:objectMap ?om1 . } on /home/jtoledo/Documents/github2/Squerall/target/mappings.ttl
2020-06-22 20:01:37 ERROR riot:101 - [line: 20, col: 42] Undefined prefix: ql
Exception in thread "main" org.apache.jena.riot.RiotException: [line: 20, col: 42] Undefined prefix: ql
        at org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.fatal(ErrorHandlerFactory.java:147)
        at org.apache.jena.riot.system.ParserProfileStd.expandPrefixedName(ParserProfileStd.java:276)
        at org.apache.jena.riot.system.ParserProfileStd.create(ParserProfileStd.java:215)
        at org.apache.jena.riot.lang.LangTurtleBase.tokenAsNode(LangTurtleBase.java:498)
        at org.apache.jena.riot.lang.LangTurtleBase.node(LangTurtleBase.java:343)

@mnmami
Copy link
Collaborator

mnmami commented Jun 22, 2020

Hi @jatoledo,

Judging from the error message: Undefined prefix: ql, it looks like you don't have the prefix ql defined in your mappings: `

@prefix ql: <http://semweb.mmlab.be/ns/ql#>

However, please note that the property rml:referenceFormulation isn't used by Squerall, even if it present in your mappings. Rather, we use another property to instruct what type of source the mapped entity is from nosql:store. See and try to reuse the example here: https://github.com/EIS-Bonn/Squerall/blob/master/evaluation/input_files/mappings.ttl#L134.

Try and let me know.

PS: We are aware that CSV isn't a NoSQL store to be used with that property; we will correct that in the future.

@jatoledo
Copy link
Author

Thank you very much for your quick reply, I will try it with the example.

@mnmami
Copy link
Collaborator

mnmami commented Jun 22, 2020

You are welcome. Don't hesitate to come back in case of errors.

@jatoledo
Copy link
Author

jatoledo commented Jun 22, 2020

In my opinion, the engine should follow RML properties and try to not include new ones because in that way we start to lose the benefits of having a standard and declarative way to describe the mapping rules. ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants