Re: A way to generate PK-strings or new blank nodes

On Thu, Oct 20, 2011 at 11:36 AM, Fabian Pijcke <fabian.pijcke@gmail.com>wrote:

> trying to implement a "Direct mapping"
> generator as a R2RML graph. (using this mapping on an
> INFORMATION_SCHEMA schema should generate the direct
> mapping).
>

Fabian - I re-read your message and I may now understand better what you are
trying to do. What I think you are doing is writing an R2RML mapping to run
against an INFORMATION_SCHEMA. The output of this first R2RML mapping will
be a second R2RML mapping which is a realization of the direct mapping for
the schema described in the INFORMATION_SCHEMA. And, specifically you are
trying to generate the R2RML in this second mapping such that it will
produce unique resource identifiers to represent each row.

Say you have a table named PERSON whose primary key is defined by the
columns FNAME and LNAME. Assume you could get this information out of the
INFORMATION_SCHEMA as a table of the form:

TABLE, PK_COLUMN, PK_COLUMN_ORDER
PERSON, FNAME, 1
PERSON, LNAME, 2

Now you would like to run a query against these tuples to produce an
aggregate value (grouped on TABLE) something like "FNAME,LNAME". You need a
list of the key columns in a string that you can use in a template in the
R2RML mapping. So I see two possibilities:

1) write the query you need in SQL - I don't know if this is possible in
generic SQL.

2) express this "aggregate template" value in R2RML - R2RML templates do not
have a notion of defining a template across rows that are aggregated
together, but I can imagine this might be a useful addition. Currently R2RML
templates only allow the use of many column values from a row.

-David

Received on Friday, 21 October 2011 12:52:05 UTC