
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Manohar,
I want the T/F value as it is in the output with different datatype. could you please help here?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Manohar B
My source value is True and False and my Target value should be T/F
Please help here.
