[resolved] Insert Null into Expression for Column in tMap

One Star

[resolved] Insert Null into Expression for Column in tMap

On an output data stream I can't figure out how to have the output column be transformed to NULL or even empty string for a particular column.
The output column metadata is varchar(2)
I have tried all kinds of useless things:
Char(0)
''.tostring()
Null
NULL
etc etc
Variables etc.
Most of the time i get 'Invalid Operand Types String and Char')
This seems so simple- how am I being stupid?
Thanks. Marc

Accepted Solutions
Community Manager

Re: [resolved] Insert Null into Expression for Column in tMap

Hello
Try
row1.columnName.equals("")?null:row1.columnName

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

All Replies
Community Manager

Re: [resolved] Insert Null into Expression for Column in tMap

Hello
Try
row1.columnName.equals("")?null:row1.columnName

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Insert Null into Expression for Column in tMap

this worked thank you.