Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a requirement where I need to change flag from y to n based on a condition.my data looks like below
Id;flag
1;y
2;y
1;
My output should be
Id;flag
1;n
2;y
1;y
If ids are same and have a flag value as y then it has to change to n and if the flag is null it has to change to y
Can anyone Suggest a solution, if so would be a great help.
Thanks in advance,
Lmit
screenshot is not allowed to take,jib flow is as below
inputfile --> tuniqrow --> tmap --> outputfile
i appiled uniqrow on both columns id and flag
the output is :
1,N
1,Y
2,N
thanks,
lmit
why you used tuniqrow?i asked you to do sort using tSortrow
sorry , my mistake i used tsortrow only
row2.flag.equals("Y") ? "N": StringHandling.LEN(row2.flag)==0 ? "Y": row2.flag
use this expression
Could you please let me know the conditions and variable port in tMap
thats a good one bro
If this help please give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
@lmit still you have issue?