[resolved] Help needed to evaluate Boolean values in Input using tMap
Hi,
I am new to the Talend tool and currently engaged in a DataMigration project.
I have an input table with values in it. One of the columns is a BigDecimal field that contains Boolean Values (0 is FALSE, 1 is TRUE), however the column also contains NULL VALUES as no default is set. For my transformation, I am using tMap, and I wish to evaluate the value in this column as follows and based on the value, enter a String value to the column in my Output table:
For example:
---------------
If row1.TestInd = 0 then put "Not Submitted" into my Output Column
If row1.TestInd = 1 then put "Submitted" into my Output Column
If row1.TestInd = null then Do nothing
Hence I created the following Expression in tMap Expression builder but it does not work.
row1.TestInd==new BigDecimal(0)?"Not Submitted": row1.TestInd==new BigDecimal(1)?"Submitted":null
It simply sets everything to NULL in the output column when I run the job. Your help is greatly appreciated.
Regards,
Ibi