I am using source as ms sql in talend big data version. There is data type as Money. While fetching schema from db. The data type changed to object. Now I need to convert it to BigDecimal or Double in tmap. I Tried to use new Bigdecimal(column name).But Its not working.
Thanks in advance.
Can you try to set the schema in your MSSQL component to Big Decimal there so that it retrieves it as a big decimal?
If not, then you need to understand what the object contains first. If it is a String, then you can cast the object to a String first like:
See the BigDecimal constructors here https://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html
There is no constructor for generic Object type. Hence, you will need to know what is in the Object and cast accordingly.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema
Pick up some tips and tricks with Context Variables