CONCATENATE COLUMN(string) in tMap BUG if is NULL?

One Star

CONCATENATE COLUMN(string) in tMap BUG if is NULL?

Hi,
I have tOracleInput_>tMap->tAggregateRow->tOralceOutput
In tMap I make (row1.column1)+(row1.column2)+(row1.column3) in tMap out field.

If column1 or column2 or column3 are NULL in output i have for example:
AnullC
nullnullC
ABnull
Anullnull
nullnullnull
I'm going to have:
AC
C
A
AB
""
Where I'm wrong????

Thanks in advance,
Gino.
Moderator

Re: CONCATENATE COLUMN(string) in tMap BUG if is NULL?

Hi,
If I understand you very well, you can use
(row1.Column1 + row1.Column2 + row1.Column3).replaceAll("null","")

in tMap expression. At first, set your data schema as "string".

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: CONCATENATE COLUMN(string) in tMap BUG if is NULL?

replaceAll("null","") won't work as expected if the strings by chance contain the substring "null"