ISSUE-41 - NULL handling - Proposal

I propose that we resolve ISSUE-41 (for R2RML) as follows:

1) by default R2RML will suppress triples when the subject, predicate, or
object columns are NULL (this applies to any of the columns used in template
expressions as well as direct column references)

2) if the application needs other handling for NULL values then a SQLQuery
can be defined in the mapping to convert NULL values to some other
application specific value

3) if there is consensus that a more convenient mechanism than a SQLQuery is
required then we can add properties to be used in subject, predicate, or
object maps that specify the value to use for NULLs. Something like:

  rr:nullValue "foo"

  This would mean to use the value "foo" anytime a NULL column value is
encountered in the context of this subject, predicate, or object map.

4) define a value to indicate that a unique blank node should be generated
for each NULL value. Something like:

   rr:nullValue rr:blank

   This means that a different blank node should be generated for every NULL
column encountered in the context of this subject, predicate or object map.
Richard's email [1] points out that SQL NULL is handled differently in the
case of aggregates. It seems like this is an important point to take into
consideration if the mapper decides to generate blank nodes for NULLs
because it seems to me this would make SPARQL aggregate results differ from
their SQL equivalents.

Personally I would just do #1 & 2. I would omit #3 and #4 from the spec at
this time in the interest of getting an initial version published. But if it
was necessary to gain consensus then I think I could back 3 & 4 as well.

-David

[1] http://lists.w3.org/Archives/Public/public-rdb2rdf-wg/2011May/0053.html

Received on Tuesday, 17 May 2011 19:46:45 UTC