Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all. I desparately need help with this issue as it's driving me mad!
In my tMap I have this
row5.Code.equals("GB") ?
row2.Postal_Code :
row2.State
To get the row5.Code I'm using a csv lookup which uses the state field in the input file to derive the country code. And it correctly derives it. My input file is also csv. So for a name field I want to use the postcode if the country is GB, else use the state field. But it doesn't seem to recognise any of the derived GB values & puts the state in the name for every one of them.
I've attached some screenshots of my job and tMap. Thanks in advance!
@JulieM39 JulieM39 , the below expression will work.
row5.Code.equals("GB") ?
row2.Postal_Code :
row2.State
but you can write this to avoid null pointer exception by writing the below way.
("GB").Code.equals(row5.Code) ?
row2.Postal_Code :
row2.State
with the above expression if your not getting expected result may be the joining fields from row5 to row2 is not matching. you need to check the join criteria and data what you are getting.
Thanks,
Manohar
@JulieM39 JulieM39 , the below expression will work.
row5.Code.equals("GB") ?
row2.Postal_Code :
row2.State
but you can write this to avoid null pointer exception by writing the below way.
("GB").Code.equals(row5.Code) ?
row2.Postal_Code :
row2.State
with the above expression if your not getting expected result may be the joining fields from row5 to row2 is not matching. you need to check the join criteria and data what you are getting.
Thanks,
Manohar