Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need one help to build below logic, we can use tMap or tJava.
My input and output is text file.
I want to populate Missing data using same value as first available value as per below screenshot.
above lookup can be used if required
Also Flag = "Y" can be used (denoted manually updated)
dataset
Acc_no|Period|Value|Flag
101|201601||Y
101|201602||Y
101|201603||Y
101|201604|30|N
101|201605|35|N
101|201606|35|Y
101|201607|35|Y
201|201601||Y
201|201602||Y
201|201603||Y
201|201604|33|N
201|201605|44|N
201|201606|44|Y
201|201607|44|Y
Thanks,
Sachin
I am little late to the party as @shong has already provided a solution. Anyways here goes mine -
Job Layout -
So, basically using tSortRow and tFilterRow tried to find and filter out the non-empty records from the file and as a result tHashOutput would hold the distinct non null values from the input file.
On second step, read the file again and use tMap to join the original file content with the tHashOutput content to get the required output.
tMap configuration -
Appreciate effort both of you @iamabhishek @shong but Sachin already mentioned in his question that they already having lookup with him. So, job would be like:
Thanks and Kudos to @shong , @iamabhishek , @aashish for taking time and providing solution.