R2RML implementation feedback: using non-existing column in mapping

Section 6 states:

[[
The referenced columns of all term maps of a triples map (subject map, predicate maps, object maps, graph maps) MUST be column names that exist in the term map's logical table.
]]
http://www.w3.org/TR/2012/CR-r2rml-20120223/#triples-map

I propose that any referenced columns (that is, the columns mentioned in rr:column, rr:template, etc.) that don't exist in the rr:sqlQuery or table are treated simply as being NULL, rather than being considered an error.

Perhaps the case could still be treated as a warning:

[[
Processors MAY warn mapping authors if a referenced column does not exist in the logical table.
]]

Rationale: A common approach to database-to-RDF mapping is to have the ontology engineer pre-define a mapping skeleton that is based on the target vocabulary, and then have the DBA complete the mapping just by filling in a suitable SQL query. Such mappings may contain optional parts that can be represented in the target vocabulary, but may or may not actually have data in the input database. Currently, the DBA would have to provide NULL values in the SQL query even for optional parts where they don't have any data. If we relaxed the requirement, then the DBA may simply ignore these parts and doesn't need to do anything about them in the query.

Downside: Misspelled column names would be treated as NULL (and hence not produce any triples) rather than being detected as an error – hence the proposal to treat it as a warning.

Best,
Richard

Received on Sunday, 22 April 2012 22:35:00 UTC