tMap - no output even if expression is correct

Highlighted
Four Stars

tMap - no output even if expression is correct

Hi, 

I have this expression which i have compiled and tested and the results is correct after testing. But when i see the output excel file, the column is empty. Any idea why?

Talend_1.PNG
Trade_Events.Transaction_Type_Code == "BUY"? "1":
Trade_Events.Transaction_Type_Code == "SEL"? "2":
Trade_Events.Transaction_Type_Code == "SELL_CI" ?"17":null


Accepted Solutions
Fifteen Stars TRF
Fifteen Stars

Re: tMap - no output even if expression is correct

Never use == to compare strings. Change your expression like this:
"BUY".equals(Trade_Events.Transaction_Type_Code
and so on for other parts.

TRF

All Replies
Moderator

Re: tMap - no output even if expression is correct

Hello,

Are you able to use tLogRow component instead of tfileoutputexcel component to print your result on console at the first step to see if this expression in tMap works well?

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.
Fifteen Stars TRF
Fifteen Stars

Re: tMap - no output even if expression is correct

Never use == to compare strings. Change your expression like this:
"BUY".equals(Trade_Events.Transaction_Type_Code
and so on for other parts.

TRF
Four Stars

Re: tMap - no output even if expression is correct

Perfect!  it works

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