Hi guys,
I'm using a tFileList component to help iterate through a bunch of files for processing and outputting to a file. At the end of each file processing, I'm looking to run a command against the output file using tSystem component.
I don't want to use the append option on the tFileOutputDelimited component as the file can grow to be quite large, so I just want to run the tSystem command against the intermediate output file after each file iteration.
I've tried just hooking up the tSystem component to the output of tFileOutputDelimited component with the thinking that since the command I'm running has no dependency on the tFileOutputDelimited component besides the final file itself, it should just run in sequence.
However, what I'm seeing is that the tSystem is running out of sequence.
Does anyone have any suggestions around this?
Thanks!
Chris
Replace Link OnSubJobOK by Iterate for tSystem component - This will execute your first iterate flow for first file and then once the flow is done, it will call tsystem and once the tsystem is done, it will pickup second file and continue in the same fashion till the end of file. Thanks Vaibhav
Hi Chris,
Can you show your job design? Flow which I can think should be like
tFileList----Iterate(1)--->tFileInputDelimited---->tFileOutputDelimited
----Iterate(2)--->TSystem (Run your command)
Try this way...
Vaibhav
Here's the job as it currently stands. I'm running the tSystem after the first subjob is done, but I'd rather run it as part of the first subjob after the file is written.
The thing with this is that I don't want to write out multiple files, but rather keep replacing the output file for each iteration but running the tSystem on it first before moving on the next input file.
Thanks!
Replace Link OnSubJobOK by Iterate for tSystem component - This will execute your first iterate flow for first file and then once the flow is done, it will call tsystem and once the tsystem is done, it will pickup second file and continue in the same fashion till the end of file. Thanks Vaibhav
Thanks! Actually, what I decided to do instead was to add a OnComponentOk trigger from the last component in the flow to the tSystem component. Either way, it still works!