ontop mapping errors

33 views
Skip to first unread message

Agnes Aboagye

unread,
Mar 3, 2025, 11:02:01 AMMar 3
to ontop4obda
Hi 
I am fairly new to Ontop.
I am trying to map my ontology to a relational database using Ontop virtual knowledge graph protege plugin, the source part which is the SQL query can retrieve the data; however the target RDF triple is giving me errors.  
"the following predicates are not declared in the ontology:-:crop,"

however, the predicate is declared in the ontology.

Could you please let me know what the issue is, am I missing something?


Thank you
predicate declaration.PNG
error.PNG

Roman Kontchakov

unread,
Mar 3, 2025, 1:32:11 PMMar 3
to Agnes Aboagye, ontop4obda
Hi Agnes

I cannot be certain without having seen the ontology and the mapping file, but it looks like there's a problem with "ontology prefixes". Open the "Active Ontology" tab and then select "Ontology Prefixes". For some reason, the "htttp://www.semanticweb.org/NutritionalDataOntology" prefix corresponds to "-". What is the full IRI of your "crop" concept? You can see that in the "Entities" tab when the concept is selected.

Best
Roman

--
Please follow our guidelines on how to report a bug https://ontop-vkg.org/community/contributing/bug-report
---
You received this message because you are subscribed to the Google Groups "ontop4obda" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ontop4obda+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ontop4obda/9430064e-a503-491b-863a-259008b9c9a5n%40googlegroups.com.

Agnes Aboagye

unread,
Mar 5, 2025, 10:25:23 AMMar 5
to ontop4obda
Hi 
 I have used the full IRI and checked the ontology prefixes, I can't see where the "-" is located, I am getting the same error.
I am happy to show you my ontology if that is okay with you. thank you for your help.

Agnes

Roman Kontchakov

unread,
Mar 5, 2025, 10:32:30 AMMar 5
to Agnes Aboagye, ontop4obda
Hi Agnes

It would be helpful if you could email the ontology.

Best
Roman

Roman Kontchakov

unread,
Mar 5, 2025, 11:12:17 AMMar 5
to Agnes Aboagye, ontop4obda
Hi Agnes

The full IRI of your "crop" concept is <http://www.semanticweb.org/NutritionalDataOntology#crop>, with # rather than /. This means that you should replace the / before "crop" in the mapping with #.

To make your life easier, I suggest you also fix the prefixes - "nutrition:" should stand for "http://www.sementicweb.org/NutritionalDataOntology#" (again, note the last character). When this is fixed, you can write nutrition:crop in your mapping (instead of the full IRI). The default prefix (":") should also be fixed by replacing the trailing / with #. When this is done, you'll be able to use :crop in the mapping.

Best
Roman

On Wed, 5 Mar 2025 at 15:55, Agnes Aboagye <aggie.ab...@gmail.com> wrote:
Hi Roman,

 I have sent you the ontology.

Thanks for your help.

Agnes

Agnes Aboagye

unread,
Mar 5, 2025, 12:24:20 PMMar 5
to Roman Kontchakov, ontop4obda
Dear Roman,

It is working now.

thank you so much

Agnes
Reply all
Reply to author
Forward
0 new messages