Re: some r2rml questions

Paul,

Comments in-line


On Wed, Mar 13, 2013 at 7:46 PM, Paul Tyson <phtyson@sbcglobal.net> wrote:

> I see this list has no traffic for several months but I thought I would
> try here first. If anyone knows of a more active forum for discussion,
> please advise.
>
> I've run into a couple of issues implementing an R2RML processor, and I
> wondered if others have encountered these and if so would you share some
> thoughts on how to solve them.
>
> First, I want to transform a column value in the R2RML processor, rather
> than in SQL, because it is quite inconvenient to do it in SQL. I would
> like the R2RML mapping spec to specify the value transformation. My
> solution was to add a "columnValueConstructor" predicate to the Term
> Map, with a range of values restricted to id values known to the R2RML
> processor. The handlers for each column value constructor must be
> hardcoded into the R2RML processor. While this suits my purpose, it is
> obviously not completely general or easily extensible. Ideally there
> might be a standard ValueMap construct that could either be defined by a
> well-known ID or an actual function specification of some sort. A
> reference to a ValueMap inside a term map would tell the processor to
> transform the column value before emitting it as RDF.
>

If I understand correctly, you are trying to do something like this [1].
Currently, the only way to do value transformation is by pushing it down
into SQL using SQL CASE.

Can you tell us why it is inconvenient to do it in SQL?

Having a way to express the translation in R2RML was widely discussed.
Please see [2,3, 4]. Actually, this was ISSUE-72 (R2RML Lookup tables) [5],
and as you can see, this was postponed.

[1] http://www.w3.org/TR/r2rml/#example-translationtable
[2] http://lists.w3.org/Archives/Public/public-rdb2rdf-wg/2011Dec/0068.html
[3]
http://www.w3.org/2001/sw/rdb2rdf/wiki/Translating_Database_Values_to_RDF_Terms
[4] http://lists.w3.org/Archives/Public/public-rdb2rdf-wg/2011Dec/0020.html
[5] http://www.w3.org/2001/sw/rdb2rdf/track/issues/72


>
> Second, I want to conditionally emit a predicate and object for a
> subject, depending on the column value returned from the object map. I
> can imagine a workaround by defining appropriate SQL views in the
> mapping spec, but in some cases it would seem more efficient and
> transparent to place a guard condition on a PredicateObjectMap.
>

It seems that this could be done with SQL CASE. However, if Lookup Tables
were part of R2RML, then it would be possible with that too.


Conclusion: looks like we have another request for R2RML Lookup tables.

What do others think?


>
> I would appreciate any comments on these issues.
>
> Regards,
> --Paul
>
>
>

Received on Thursday, 14 March 2013 06:06:47 UTC