On 09/04/13 10:48, Richard Cyganiak wrote:
> 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.

Yes, you are correct. Many of my URI patterns are of this format. 
Changing them such at they do not overlap, fixed the "Unsupported 
NUMERIC format" problem.

However, it did not remove the malformed triples in the dump, which came 
from two tables/classmap:

  1) ...wellbore/1004/test/drillstem/4.1E0

  2) 
...wellbore/100/document/100%5F07%5F31%5F3%5F2%5FBorehole%5Fgeoph.well%5FGeophone%5Fencl%5F1.pdf

    which in decoded form is

...wellbore/100/document/100_07_31_3_2_Borehole_geoph.well_Geophone_encl_1.pdf

I have come up with solutions for both problems:

The problem with 1) was that the value 4.1E0 is stored in a FLOAT 
datatype. The SELECT query for this resource uses equality in the WHERE 
clause to get the correct row, and this fails, since comparing FLOATs 
this way is not a good idea:

... WHERE (`wellbore_dst`.`wlbDstTestNumber` = 3.3 ...

Changing the DB datatype to DECIMAL fixed the problem.

BTW, the decimal value 4.1 is exported as 4.1E0. I would prefer that the 
exported value was 4.1. Is there a way to achieve this?

The problem with 2) is, I think, that the filename part of the URL 
(100_07_31_3_2_Borehole_geoph.well_Geophone_encl_1) is de-urlified (in 
the map the url pattern is urlified with |urlify), but the filename 
contained underscores prior to urlification, so de-urlification removes 
too many underscores. Replacing |urlify with |urlencode fixed the problem.

> Also please report this as a bug in the tracker.

Will do!

Thanks,
Martin

------------------------------------------------------------------------------
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