From: Beppe M. <bep...@gm...> - 2017-05-22 13:52:46
|
Hi Hughs It seems the problem is not related to the RDF views tied to the tables, because it happens even before executing the mapping. The problem arises *only *when I bulk load data into the tables with the tool Sqlworkbench/J using the Virtuoso JDBC driver virtjdbc4_2.jar. So there is something in the Sqlworkbench/j or (it seems to me more likely) in the JDBC driver that causes the issue. Cheers Beppe 2017-05-16 10:27 GMT+01:00 Beppe Mazzola <bep...@gm...>: > Hi Hugh > > I have noticed something strange related to the PK index of the table > provided to you. > > After having run all the scripts I executed again by chance the first > INSERT statement and VOS allowed me to do it! And I could see both the rows > with ID=0 in the table... > At this point if you delete the rows with ID=0 one of them is deleted, and > the remaining one is visible only with select not using the PK index. This > might have a relation with the original RDF view issue.... > > I have used the Conductor Interactive SQL. > > Cheers > > Beppe > > > 2017-05-16 9:25 GMT+01:00 Beppe Mazzola <bep...@gm...>: > >> Hi Hugh >> >> Here are the steps to reproduce the problem. >> >> 1) Create the 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 ) >> ); >> >> 2) initialize it with the attached script initANNEXES.sql >> >> 3) create the virtual graph with the attached script ttlpExecTrial.sql >> >> 4) query the virtual graph >> select * >> from <http://test/rdfGen1> >> where { >> #<http://ec.europa.eu/semantic_webgate/dataset/pesticides/r >> esource/annex-0> ?p ?o. >> ?s ?p ?o filter regex(str(?s),'annex-0') . >> } >> >> I have used Virtuoso Open Source Edition (multi threaded) >> Version 7.2.4.3217-threads as of Apr 25 2016 >> Compiled for Win64 (x86_64-generic-win-64) >> >> Cheers >> >> Beppe >> >> >> 2017-05-14 22:53 GMT+01:00 Hugh Williams <hwi...@op...>: >> >>> Hi >>> >>> Can you please provide the actual steps to reproduce the issue being >>> encountered as it is not clear from the information provided ? >>> >>> Best Regards >>> Hugh Williams >>> Professional Services >>> OpenLink Software, Inc. // http://www.openlinksw.com/ >>> Weblog -- http://www.openlinksw.com/blogs/ >>> LinkedIn -- http://www.linkedin.com/company/openlink-software/ >>> Twitter -- http://twitter.com/OpenLink >>> Google+ -- http://plus.google.com/100570109519069333827/ >>> Facebook -- http://www.facebook.com/OpenLinkSoftware >>> Universal Data Access, Integration, and Management Technology Providers >>> >>> >>> >>> On 13 May 2017, at 18:01, Beppe Mazzola <bep...@gm...> wrote: >>> >>> 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://slashdot.org>! >>> http://sdm.link/slashdot_______________________________________________ >>> Virtuoso-users mailing list >>> Vir...@li... >>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users >>> >>> >>> >> > |