Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi there, I have a query,
my folder contains 100 files with the same metadata in text format.
so I need in the output the total number of files and the sum of (the total size of files), i used the below job, but I got the solution for the total number of files and I didn't know how to print total files size. if anyone knows plz help me. thank you in advance
Hi
There is a global variable ((Integer)globalMap.get("tFileList_1_NB_FILE")) that counts the total number of files are found, you can use this global variable.
To get the total size of all files, you need to calculate the sum using tAggregateRow as you did.
tHashInput--main---tMap--tAggregateRow--tFileOutputDelimited
on tMap, add a new column in the output table and set a fixed value (eg: "groupName"), this column will be used as group element on tAggreGateRow to sum up the file sizes.
Regards
Shong
i think this one is correct might be, see attached
Hi
There is a global variable ((Integer)globalMap.get("tFileList_1_NB_FILE")) that counts the total number of files are found, you can use this global variable.
To get the total size of all files, you need to calculate the sum using tAggregateRow as you did.
tHashInput--main---tMap--tAggregateRow--tFileOutputDelimited
on tMap, add a new column in the output table and set a fixed value (eg: "groupName"), this column will be used as group element on tAggreGateRow to sum up the file sizes.
Regards
Shong
Thank you bro, now i got the solution.