Re: TC - Delimited identifiers minor question

Boris,

Yes, you need to include the delimiters also in templates.

If an identifier has been originally created as a delimited identifier (like "NAME" with double quotes), then it *always* has to be referenced as a delimited identifier in R2RML.

If it has been originally created as a simple identifier, then it is *always* referenced without delimiters in R2RML (and is case-insensitive).

(There's one silly SQL-imposed exception: An all-upper-case delimited identifier and an all-upper-case undelimited identifer are considered equivalent. So if you create "NAME", you can reference it in R2RML templates as "http://example.org/{NAME}" or "http://example.org/{\"NAME\"}". Again, this only applies to all-upper-case identifiers.)

Best,
Richard


On 29 Feb 2012, at 16:51, Boris Villazon-Terrazas wrote:

> Hi all
> 
> I have a trivial question ….
> Let's suppose we have the following DDL
> 
> CREATE TABLE "Student" (
>        "Name" varchar(50)
> );
> 
> and the following R2RML mapping
> 
> @prefix rr: <http://www.w3.org/ns/r2rml#> .
> @prefix foaf: <http://xmlns.com/foaf/0.1/> .
> @prefix ex: <http://example.com/> .
> @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
> @base <http://mappingpedia.org/rdb2rdf/r2rml/tc/> .
> 
> <TriplesMap1>
>     a rr:TriplesMap;
>         
>     rr:logicalTable [ rr:tableName "\"Student\""; ] ;
> 	
>     rr:subjectMap [ rr:template "http://example.com/{\"Name\"}" ];     <-------------------
> 	
>     rr:predicateObjectMap
>     [ 
>       rr:predicateMap [ rr:constant foaf:name ]; 
>       rr:objectMap    [ rr:column "\"Name\"" ]
>     ]
>     .
> 
> The question is if it is necessary to include \"\", for the delimited identifiers, when using the rr:template ?
> 
> Thanks in advance
> 
> Boris
> 

Received on Thursday, 1 March 2012 13:44:45 UTC