Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have below scenario, I want to compare the output of tUniqueRow and accordingly either run A or B. Any suggestion how should I go about it.
Brgds,
Sudhir
Hi,
tfilecount is not necessary as the tuniquerow gives you the number of unique rows by a global variable.
I am able to see a tfilelist component at the front.
Are you going to use multiple files?
If just one file it is simple.
1. Create a tjava
2. Take a subjob ok from tfilelist component and connect to tjava. Nothing required inside tjava
3. From tjava create 2 runif connector and connect to process a and b
4. ((Integer)globalMap.get("tUniqRow_1_NB_UNIQUES")) and ((Integer)globalMap.get("tUniqRow_2_NB_UNIQUES"))is the global variable to get the unique number of rows from both the filters
5. each run if you can use the above variables to do a comparison
For multiple files, I am still thinking how we can go about it. give it a try by following all steps above and taking componentok from tfileinput delimited.
Cheers!
Gatha
@shong wrote:
Hello
Basically, we will use runIf connector to fire a subjob base on a condition, but now I don't know what your data comparison logic. Please give us some example data out of tUniqRow1 and tUniqRow2 to explain your logic.
Regards
Shong
something like this, though I am not sure if this is the best way to implement this. If you can let me know how to compare o/p of two tfilerowcounts
Hi,
tfilecount is not necessary as the tuniquerow gives you the number of unique rows by a global variable.
I am able to see a tfilelist component at the front.
Are you going to use multiple files?
If just one file it is simple.
1. Create a tjava
2. Take a subjob ok from tfilelist component and connect to tjava. Nothing required inside tjava
3. From tjava create 2 runif connector and connect to process a and b
4. ((Integer)globalMap.get("tUniqRow_1_NB_UNIQUES")) and ((Integer)globalMap.get("tUniqRow_2_NB_UNIQUES"))is the global variable to get the unique number of rows from both the filters
5. each run if you can use the above variables to do a comparison
For multiple files, I am still thinking how we can go about it. give it a try by following all steps above and taking componentok from tfileinput delimited.
Cheers!
Gatha
Thanks, I will try this option.
Thanks Gatha ! I could do it and its working for multiple files too. Have a look.
That's cool.
Please test this with more number of records in the file.
Please mark my previous comment as solution and give Kudos where ever necessary
Cheers!
Gatha