Hey All,
So i'm having a bit of trouble with a job. I've currently got a process that extracts data from a number of excel pages, then packages that data as csv files and creates archives of them and the original document. My issue is with the extraction portion. As of right now, I am iterating a number of files to have the data extracted and all of these files are going through and being changed into csv files successfully. The issue is that the data is only extracted from the first file and this data is put into all of the csv files that are created. For example I have Files 1 2 3 and 4 going through the process. I end up with csv files for all of them, however the data in these csv files is only the data from file 1. I've included a screenshot of my job below. The rest of the job is working fine it is only this issue with the data extraction. Any help would be much appreciated!
Thanks,
Ryan
Hi
I think there must be something wrong in the job design, what does the tJavaRow do in the job? Some screenshots of tFileInputExcel, tJavaRow, tFileFixedFlow and tFileOutputDelimtied component will be helpful for us to understand the problem.
Shong
The problem is that your sequence is not being restarted for each file so, if the first file contains 100 rows, seq is 101 for the first row of the second file.
There are two ways to fix it:
1. Use the tFileList file name or number as the sequence name (instead of "s1") so each file has its own sequence; or
2. Add a tJava between tFileList and tFileInputExcel where you can call Numeric.resetSequence or Numeric.removeSequence to restart the sequence "s1".
Awesome thanks for the reply! I'm rather new to this so I'm going to request a little more help. The second option sounds like the best route for me to take. Could you possibly further explain how i would go about doing what you suggested? Thanks again for the help!
tJava just executes whatever code you put in it but it's intended to be used as a stand-alone subjob not in a flow. In you case, just put in either:
Numeric.resetSequence("s1",0);
--or--
Numeric.removeSequence("s1");