convert string datatype to boolean datatype

One Star

convert string datatype to boolean datatype

Hello,
I have requirement where i have to convert a string coming from a database to a boolean datatype in to salesforce.
the  string value are ( 'Y' and 'N' ) from a column in table.....
and my mapping components are 
sql server table--->tmap-->salesforce output component...
which method should i use in tmap expression editor to convert the string 'N' or string 'Y' to boolean datatype for salesforce.
or this needs to be converted by using something else???im new to talend so pls provde the answer in detail
Highlighted

Re: convert string datatype to boolean datatype

Hi Ather,
you can write like this in tMap
databasevalue.equals("Y")?true:false. please try this once
Thanks
Srikanth 

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog