Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
BA621858188
Creator
Creator

Converting String to boolean

Hi All,

I am trying to convert String data type value to boolean.

Source is DB Table where values are T/F. Tmap used for just for transformation.

using tconverttype I am doing conversion from string to boolean but getting below error:

Cannot convert "T" to Boolean

Cannot convert "F" to Boolean

Cannot convert "T" to Boolean

Cannot convert "T" to Boolean

Cannot convert "F" to Boolean

Cannot convert "F" to Boolean

Cannot convert "F" to Boolean

Please help.

Thanks

Labels (3)
3 Replies
manodwhb
Champion II
Champion II

@Vrushabh Malbari​ , first you need write a function to convert string to another string and then you use tconverttype.

 

row1.col.equals("T")?"true":"false"

 

since in talend, boolean values would be expected like true or false.

 

Thanks,

Manohar

BA621858188
Creator
Creator
Author

Hi Manohar,

 

I want the T/F value as it is in the output with different datatype. could you please help here?

BA621858188
Creator
Creator
Author

@Manohar B​ 

 

My source value is True and False and my Target value should be T/F

 

Please help here.