You probably have a URI pattern like "a/@@foo@@" and then another 
"a/@@foo@@/b/@@bar@@". The engine tries to find the patterns that match the URI 
"a/1/b/1" and mistakenly thinks that the first pattern matches, with foo equal 
1/b/1. As a workaround, change the "a" part to "a2" in one of the patterns, so 
that they don't overlap. Also please report this as a bug in the tracker.

Best,
Richard


On 8 Apr 2013, at 11:02, "Martin G. Skjæveland" <mart...@ifi.uio.no> wrote:

> Hi,
> 
> I'm using D2RQ 0.8.1 on a MySQL 5.1.35 database. On the surface, 
> everything looks fine, but when I use dump-rdf the produced rdf file 
> contains triples which only consist of a lonely subject, e.g,
> 
>   <http://example.org#test>
>     .
> 
> When I run the export I get many warnings of the form
> 
>   11:06:54 WARN  DataType             :: Unsupported NUMERIC format: 
> '2/test/mud/161'; treating as NULL
> 
> which currently is my only lead as to what the problem might be. 
> However, I don't understand the warning: it is clear that 
> '2/test/mud/161' is not a numeric, but it is the uriPattern of a 
> classmap and has nothing to do with numerics? Furthermore, if NUMERIC is 
> here a SQL datatype, the database does not contain (at least not 
> explicitly) any NUMERIC columns.
> 
> Any help is greatly appreciated! Below is console output, database table 
> and data, and d2qr mappings. Let me know if I can provide more information.
> 
> Thanks,
> Martin
> 
> The console output of starting d2r-server and opening the resource which 
> corresponds to '2/test/mud/161' (which by the way displays the database 
> contents correctly):
> 
> 11:06:29 INFO  SystemLoader         :: Reading mapping file from 
> ../map/npd-d2rq-map.ttl
> 11:06:31 INFO  MapParser            :: Done reading D2RQ map with 1 
> databases and 81 class maps
> 11:06:31 INFO  Server               :: jetty-8.1.1.v20120215
> 11:06:31 INFO  ContextHandler       :: started 
> o.e.j.w.WebAppContext{,file:/home/martige/repo/thoralf/projects/npd/d2rq/webapp/},webapp
> 11:06:31 INFO  ContextHandler       :: started 
> o.e.j.w.WebAppContext{,file:xxx/projects/npd/d2rq/webapp/},webapp
> 11:06:31 INFO  ConnectedDB          :: Establishing JDBC connection to 
> jdbc:mysql://mysql.xxx
> 11:06:31 INFO  ConnectedDB          :: JDBC database product type: MySQL
> 11:06:31 INFO  ConnectedDB          :: Using vendor class: 
> de.fuberlin.wiwiss.d2rq.sql.vendor.MySQL
> 11:06:40 INFO  Mapping              :: Compiled 1112 property bridges
> 11:06:46 INFO  D2RServer            :: Safe mode (launch using --fast to 
> use all optimizations)
> 11:06:46 INFO  ContextHandler       :: started 
> o.e.j.w.WebAppContext{,file:xxx/projects/npd/d2rq/webapp/},webapp
> 11:06:46 INFO  AbstractConnector    :: Started 
> SelectChannelConnector@0.0.0.0:2020
> 11:06:46 INFO  JettyLauncher        :: [[[ Server started at 
> http://localhost:2020/ ]]]
> 11:06:52 INFO  ClassMapLister       :: Listing class map: wellbore_mud
> 11:06:52 INFO  SQLIterator          :: SELECT 
> `wellbore_mud`.`wellbore_mud_id`, `wellbore_mud`.`wlbNpdidWellbore` FROM 
> `wellbore_mud` ORDER BY `wellbore_mud`.`wlbNpdidWellbore`, 
> `wellbore_mud`.`wellbore_mud_id` LIMIT 50
> 
> Then ~300 lines of
> 
>   11:06:54 WARN  DataType             :: Unsupported NUMERIC format: 
> '2/test/mud/161'; treating as NULL
> 
> Then ~20 different lines of
> 
>   11:06:54 INFO  SQLIterator          :: SELECT .....
> 
> and finally
> 
>   11:06:55 INFO  ConfigLoader         :: Using default metadata template.
> 
> An online version is available at:
> 
>   http://sws.ifi.uio.no/project/npd-v2/d2rq/page/wellbore/2/test/mud/161
> 
> 
> The SQL table from which the data is collected:
> 
> CREATE TABLE wellbore_mud (
>    wlbName VARCHAR(60) COMMENT "Wellbore name",
>    wlbMD FLOAT COMMENT "Depth MD [m]",
>    wlbMudWeightAtMD FLOAT COMMENT "Mud weight [g/cm3]",
>    wlbMudViscosityAtMD FLOAT COMMENT "Visc. [mPa.s]",
>    wlbYieldPointAtMD FLOAT COMMENT "Yield point [Pa]",
>    wlbMudType VARCHAR(40) COMMENT "Mud type",
>    wlbMudDateMeasured DATE COMMENT "Date measured",
>    wlbNpdidWellbore INTEGER COMMENT "NPDID wellbore",
>    wlbMudDateUpdated DATE COMMENT "Date updated",
>    dateSyncNPD DATE,
>    wellbore_mud_id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE,
>    PRIMARY KEY (wellbore_mud_id,wlbNpdidWellbore)
> ) ENGINE=InnoDB;
> 
> The table row which '2/test/mud/161' identifies:
> 
> ('1/3-4',820,1.15,60,0,'waterbased','9999-12-31',2,'9999-12-31','2013-04-07',161)
> 
> (The complete schema and data dumps are available at:
>   http://sws.ifi.uio.no/project/npd-v2/sql/ .)
> 
> 
> and this is the classmap:
> 
> map:wellbore_mud
>     a d2rq:ClassMap;
>     rdfs:label "WellboreDrillingMud__wellbore_mud";
>     d2rq:dataStorage map:Adatabase;
>     d2rq:uriPattern 
> "wellbore/@@wellbore_mud.wlbNpdidWellbore@@/test/mud/@@wellbore_mud.wellbore_mud_id@@";
>     d2rq:class npdv:WellboreDrillingMud;
>     d2rq:classDefinitionComment "Wellbore: Drilling mud" .
> 
> (The complete D2RQ map is available at:
>   http://sws.ifi.uio.no/project/npd-v2/map/ .)
> 
> 
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> d2rq-map-devel mailing list
> d2rq-map-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
d2rq-map-devel mailing list
d2rq-map-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/d2rq-map-devel

Reply via email to