conversion of integer to bollean

Highlighted
Seven Stars

conversion of integer to bollean

team,

 

How to convert of integer to boolean.

 

integer values: 1,0, 23, etc

if col1>0 set 1 else 0.

 

target column is boolean.

 

thanks in advance

 

Thanks

shree


Accepted Solutions
Highlighted
Employee

Re: conversion of integer to bollean

Hi,

 

    Please use a tmap with expression (row1.col1 > 0)?true:false  where col1 is the input column name.

image.png

 

 

 

Please mark the topic as solution provided if the reply has helped you. Kudos are also welcome :-)

 

Warm Regards,

 

Nikhil Thampi

View solution in original post


All Replies
Highlighted
Employee

Re: conversion of integer to bollean

Hi,

 

    Please use a tmap with expression (row1.col1 > 0)?true:false  where col1 is the input column name.

image.png

 

 

 

Please mark the topic as solution provided if the reply has helped you. Kudos are also welcome :-)

 

Warm Regards,

 

Nikhil Thampi

View solution in original post

Highlighted
Seven Stars

Re: conversion of integer to bollean

Thanks @nikhilthampi,

 

Small query without if condition how to convert integer to Boolean,

 

Thanks

shree

2019 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

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