is there a possible answer?
Just to understand the question a bit better. Are you trying to
1) use D2R to convert a relational table(s) into an RDF graph in N-TRIPLES format, and
2) use Jena Adapter to load the N-TRIPLE file into RDF store in Oracle Database 12c?
1) I have already
2) In this step I get an error with the Decimal Type (used in the file .ttl of D2Rq) that adds E (exponent). Was originally a type BigDicimale
FROM "dbo"."LABO33_ESSAI_APC01" WHERE (dbo."LABO33_ESSAI_APC01"."labo33_Methanol" IS NOT NULL OR dbo."LABO33_ESSAI_APC01"."labo33_Ethanol" IS NOT NULL)
15:07:15 WARN OracleBulkUpdateHandler :: addInBulk: [13660 ] sqle
java.sql.SQLException: ORA-13199: During LBV: [04-NOV-14 03.07.15.421063000 PM -05:00]
ORA-13199: Element Parse Error: Invalid numeric value [debug info: GCVN-numeric: 114.4000015258789E0] (value: "114.4000015258789E0"^^<http://www.w3.org/2001/XMLSchema#decimal>) [
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.SDO_RDF", line 86
ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 1307
ORA-06512: at line 1
ORA-06512: at "MDSYS.SDO_RDF_INTERNAL", line 2826
I posted a little more useful logs :
ERROR :: com.hp.hpl.jena.datatypes.DatatypeFormatException: Lexical form '115.0E0' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#decimal -> class java.math.BigDecimal] Lexical form '115.0E0' is not a legal instance of Datatype[http://www.w3.org/2001/XMLSchema#decimal -> class java.math.BigDecimal] during parse -org.apache.xerces.impl.dv.InvalidDatatypeValueException: cvc-datatype-valid.1.2.1: '115.0E0' is not a valid value for 'decimal'.
I a file generated with .ttl d2rq, plus manual modification.
Here is a piece:
map:Huile_0 a d2rq:PropertyBridge ;
d2rq:belongsToClassMap map:Labo33_essai_apc01 ;
d2rq:column "dbo.EQUI13_INVENT_1T.equi13_QteHuileApp" ;
#d2rq:condition "dbo.\"MAINT_INVENT_General\".\"Cle_Equipement\" NOT IN (SELECT \"equi01_CleEquip\" FROM dbo.\"EQUI14_INVENT_1U\")" ;
d2rq:datatype xsd:decimal ;
d2rq:join "dbo.EQUI13_INVENT_1T.equi01_CleEquip = dbo.MAINT_INVENT_General.Cle_Equipement" ;
d2rq:join "dbo.LABO33_ESSAI_APC01.equi01_CleEquip = dbo.MAINT_INVENT_General.Cle_Equipement" ;
d2rq:property vocab:MIDATDEV_MESURE_QUANTITE_HUILE .
I get the value of the Decimal type is the style: 114 E 0
Values are automatically converted as a scientific notation. But it Creates an error when I transferred in decimal guy Oracle c12
Does it make a difference to use xsd:double for the d2rq:datatype?
Alternatively, you might be able to use d2rq:sqlExpression to do some format conversion. However, I am not a MS SQL Server expert.
yes, I have already tested d2rq: SqlExpression for conversion but without success.
I did the test with type Double, but with the following message: [WARN] DataType - Unsupported NUMERIC format: ''; treating as NULL
to you a proposed solution?
I can only speculate here because I don't have a SQL Server database. Given the message, it seems that there might be values like "123,01"
In some countries/systems, decimal separator is a comma "," instead of a dot "."
Is that the case for your SQL Server?
Given the above message, a WARN instead of an ERROR, do you get triples generated at all?
It is with points.
Currently the Warning is not a hand blocking the point I do not know this is a result with Warning !!
I use d2rq to the transformation of relational and RDF file with the Association d2rq attached.
The result is that when I recovered figures initially BigDecimale (in the relational database) I transform them ^^Double or ^^Decimal I have the scientific concept that is used with an E?
Message: ORA-13199: Element Parse Error: Invalid numeric value [debug info: GCVN-numeric: 114.4000015258789E0] (value: "114.4000015258789E0"^^<http://www.w3.org/2001/XMLSchema#decimal>)
How it is possible to resolve this behavior?
I have posted a suggestion before. Not sure if you have got a chance to give it a try.
Is it possible to get rid of E0 from your decimal values?
Assume you have an N-TRIPLE file, you can do a string replacement of
No it is not possible to solve the problem also easily.
The values are initially identified in a basic field DB (SQLServeur) is a measure mathematical type BigDecimal (so a very long number with high accuracy), but when I transferred it with has triple base DB (Oralce c12) I provide in the form of type Double with d2rq.
The result is a number with an exponent of the style: xxxE1 or xxxE0 or xxxE2 ...
This is in my opinion a scientific representation of the number is correct, but can not be considered a digital type JAVA, this is where my problem just now.
Thank you in advance for your suggestions, hope to have given you more clarification.
I see. Previously I thought you only had "E0"
Here is a different approach. You can read the generated RDF data into a Jena Model, iterate through the triples, and for each object field that is of type xsd:decimal, parse it using Java BigDecimal, apply toString method, generate a new triple and append it to an empty model. Finally, dump out that new model into a file.
Hope it helps,