Hi Johan,
Sorry, I didn't understand where the problem is.
What do you mean by "redoing the original join"? Is it currently done at the mapping level? Instead, would like you like the joins to be introduced by the SPARQL query?
Having the joins introduced by the SPARQL query is the normal
setting for OBDA. SQL queries used in the mapping entries are
expected most of the time to be simple, without any join. The main
things that are shared between mapping entries are IRI templates.
The main motivation for introducing a join in a mapping entry is
because the triple pattern is using columns coming from different
tables. In some particular cases, the join is introduced for
filtering out results. It is not clear to me what would motivate a
join in your case.
Could you please also fix your SPARQL query? It seems that it is
missing semi-colons, some question marks and a GROUP BY clause.
Also, a few mapping entries would help.
Best,
Benjamin
--
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 on the web visit https://groups.google.com/d/msgid/ontop4obda/e9559708-a81f-4aef-8b8a-75ec636bc375n%40googlegroups.com.
Hi Benjamin,
Sorry for my confusing and inaccurate explanation.
It seems I was too tired when I wrote it.
Allow me to clarify.
We are considering Ontop VKG as a virtual curation tool.
That means that we:
Obviously, it would be easier, if we could reuse the previously mapped knowledge for the specification of this derived property.
I know that a mapping source can only be SQL today, but imagine that we could also use SPARQL in the mapping source.
Then we could just write the above SPARQL query as mapping source and construct the avgBakingTemperature property instances out of this.
Target:
?myBread a :Bread; :avgBakingTemperature ?avgTemperature
Source:
The above SPARQL query
I now this target’s syntax is not “valid” with respect to the current rules, but you get my intention.
You are the OBDA expert, but conceptually it feels to match quite good with the scope of OBDA.
OBDA could rewrite the provided SPARQL query into a SQL query based on the other available mappings using the same mechanisms it uses for answering SPARQL queries in the first place.
(Well, I’m sure I oversimplify the complexity here…)
Alternatively, one could also put this problem in the shoes of a reasoner, but as far as I know, this is way beyond what they can do, no?
I hope I was able to make the question/suggestion somewhat clea(nr)er.
I'd be happy to learn your opinion on this.
Thanks for you time,
Johan
To view this discussion on the web visit https://groups.google.com/d/msgid/ontop4obda/ff5c91c9-1af5-4ed7-ae88-9ff392c75373n%40googlegroups.com.
Hi,
Thank you Johan for this detailed explanation, the problem is now clear.
It is a perfectly legitimate case that goes well with the
OBDA/VKG story. This reminds me the role of data marts in data
warehouse approaches. It is also related to several discussions
like https://github.com/ontop/ontop/issues/470
At first glance, from a technical point of view, I foresee 2 possible solutions:
1. Create a new kind of Ontop views (https://ontop-vkg.org/guide/advanced/views) defined from SPARQL SELECT queries. These views would then be directly used in the mapping file. This goes in the direction of what Johan proposed.
2. Augment internally the mapping using a set of INSERT SPARQL queries. These queries would be run on the mapping before augmentation, avoiding loop problems. This is more in the direction of Martynas's proposal.
At the moment, I would be more in favor of solution #2, as it looks simpler to implement.
Best,
Benjamin
To view this discussion on the web visit https://groups.google.com/d/msgid/ontop4obda/CAGpOn6ZXz7z82KtmkLban3zeh1ZgupKbGHjOFi8KFL08Xc_FEQ%40mail.gmail.com.