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

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 

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.