Hi to everybody

I have generated with Virtuoso Open Source a virtual graph with the content
of many RDB tables.obtained with an R2RML mapping.

If I execute the following query I do not get any result.

select *
from<http://example.com/pesticides/resource>
where {
 <http://example.com/pesticides/resource/annex-0> ?p ?o.
}

but if I execute this query (I suppose without index because it takes many
seconds)

select *
from<http://example.com/pesticides/resource>
where {
?s ?p ?o filter regex(str(?s),'annex-0') .
}


I get the exact result, that is the content of the corresponding table row.

http://example.com/pesticides/resource/annex-0
<http://ec.europa.eu/semantic_webgate/dataset/pesticides/resource/annex-0>
http://
<http://ec.europa.eu/semantic_webgate/dataset/pesticides/resource/annexId>
example.com
<http://ec.europa.eu/semantic_webgate/dataset/pesticides/resource/annex-0>/pesticides/resource/annexId
0
http://example.com/pesticides/resource/annex-0
<http://ec.europa.eu/semantic_webgate/dataset/pesticides/resource/annex-0>
http://
<http://ec.europa.eu/semantic_webgate/dataset/pesticides/resource/annexName>
example.com
<http://ec.europa.eu/semantic_webgate/dataset/pesticides/resource/annex-0>/pesticides/resource/annexName
Not Assigned
http://example.com/pesticides/resource/annex-0
<http://ec.europa.eu/semantic_webgate/dataset/pesticides/resource/annex-0>
http://
<http://ec.europa.eu/semantic_webgate/dataset/pesticides/resource/annexSpecial>
example.com
<http://ec.europa.eu/semantic_webgate/dataset/pesticides/resource/annex-0>/pesticides/resource/annexSpecial
0
http://example.com/pesticides/resource/annex-0
<http://ec.europa.eu/semantic_webgate/dataset/pesticides/resource/annex-0>
http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://
<http://ec.europa.eu/semantic_webgate/dataset/pesticides/resource/Annex>
example.com
<http://ec.europa.eu/semantic_webgate/dataset/pesticides/resource/annex-0>
/pesticides/resource/Annex

It looks like the index does not catch the triples....  This is the
involved R2RML mapping fragment

<#TriplesMapANNEXES> a rr:TriplesMap;
        rr:logicalTable [
                rr:tableSchema "DB" ;
            rr:tableOwner "pest" ;
            rr:tableName "ANNEXES"
    ];
        rr:subjectMap [
                rr:termType rr:IRI  ;
        rr:template "
http://example.com/pesticides/resource/annex-{ANNEXES_ID}";;
        rr:class pest:Annex;
        rr:graph <http://example.com/pesticides/resource> ];
        rr:predicateObjectMap [
                rr:predicateMap [
            rr:constant pest:annexId ] ;
        rr:objectMap [
            rr:column "ANNEXES_ID" ]; ] ;
        rr:predicateObjectMap [
                rr:predicateMap [
            rr:constant pest:annexName ] ;
        rr:objectMap [
            rr:column "ANNEXES_NAMES" ]; ] ;
        rr:predicateObjectMap [
                rr:predicateMap [
            rr:constant pest:annexPart ] ;
        rr:objectMap [
            rr:column "ANNEXES_PART" ]; ] ;
        rr:predicateObjectMap [
                rr:predicateMap [
            rr:constant pest:annexSpecial ] ;
        rr:objectMap [
            rr:column "ANNEXES_SPECIAL" ];
    ] .

of the following Virtuoso table

CREATE TABLE DB.PEST.ANNEXES
(
  ANNEXES_ID NUMERIC NOT NULL
, ANNEXES_NAMES VARCHAR(50) NOT NULL
, ANNEXES_PART VARCHAR(1)
, ANNEXES_SPECIAL CHAR(1) NOT NULL
, CONSTRAINT PK_ANNEXES PRIMARY KEY (ANNEXES_ID )
);

Had anyone a similar experience? Any hint?

Thanks!

Cheers

Beppe
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to