Hello, I have a AS400 database that contains data with decimal type. when I loaded the data ,Talend convert the Decimal type to BigDecimal . And for the destination I have a postgres database . when I made the connection between the two databases using a tmap component. this error msg appears: Exception in thread "main" java.lang.Error: Problèmes de compilation non résolus : Non concordance de types : impossible de convertir de BigDecimal en double Non concordance de types : impossible de convertir de BigDecimal en double Non concordance de types : impossible de convertir de BigDecimal en double
hi asterisks, first Talend use a Xml file to Map DB type to JavaType (also known as Talend Type) and 'vice-versa'. There is no implicit cast between type. So you can't change the way Talend Map conversion Type by Default. You have to convert type if necessary ; for that purpose use tConvertType. BE AWARE about java type for decimal and loosing precision with floating type like Float & Double hope it helps regards laurent
hi all, Because floating-point numbers have a limited number of digits, they cannot represent all real numbers accurately: when there are more digits than the format allows, the leftover ones are omitted - the number isrounded.
You will not losing any precision if you only transfer data also on Double
You mean if you make any calculation on decimal and JUST propagate value through the flows !? regards laurent
Hi, Thanks for your feedback. Could you please click the "Set this topic as resolved" link which is right underneath your initial post? This way, other users will be informed that this thread has been resolved. Many thanks Best regards Sabrina
-- Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
@jlolling Thanks for the expression May you can give a short exaplaination what he expression does Will be helpful Additional: Could i use the expression for an Fieldlookup also or only for mapping. Thanks in advance regards fireskyer