DB: SQL Server I am using tMap component to transform data from source to Destination in SQL Server. Its throwing the error as "Type mismatch: cannot convert from int to BigDecimal" Any help on achiving this? Thanks, -Teja
Hi! I have the same problem as him... I have a BigDecimal 'BPP_TYPE' in my table (row1), that I want to test : => If it is equal to 1, I will write "Physique" instead => If it is not (0 or NULL), I will write "Morale" So, I switch from BigDecimal (row1) to String (output of my tmap) In my tmap, I first had the following expression in the Var field : row1.BPP_TYPE==1?"Physique":"Morale" Obviously it doesn't work, so I changed it to : row1.BPP_TYPE==BigDecimal(1)?"Physique":"Morale" That doesn't work neither... My problem is that I don't know how to import/create java methods (as BigDecimal(int)) in my job... Any Help? Thanks!
In this case try to use tConvertType before pointing the source (you can't convert ) into tMap. tConvertType converts your colums automatically (by setting the option in components properties) and lets you change data types in a flow.
Hi again! I solved my problem, changing the preferences of Talend (Window>Preferences). I changed the xml file of Oracle mapping, allowing number cast to integer et not BigDecimal... It is so much easier to do any modification then! I followed this exemple, "V. Définir les types de variables" (in French sorry...) : http://jsdarges.developpez.com/tutoriels/bi/bien-debuter-projet-talend/