Iterate, filter, and merge into a single XML file

One Star

Iterate, filter, and merge into a single XML file

Hi everyone,
As I'm quite new to TOS, my question may be simple for you. Here is the job I'm trying to set up :
tFileList -(iterate)> tFileUnarchive -(iterate)> tFileInputXML -> tFilterRow -> tAdvancedFileOutputXML
Here is a description of this job :
I have a set of zipped XML files of the same structure. I want to open each one, parse it, look for a specific value for a node and i found, add it to a *single* output file.
And here is my probleme today : I can't find the way to have a single file : either the file generated overwrite the previous one and I have only one file or I generate several files with a different name, but their size may vary a lot...
If someone can help me to find out a solution, it would be great.
Thanks.
One Star

Re: Iterate, filter, and merge into a single XML file

Try a tUnite before the last step. It should combine the individual flows created by the iterate links into one flow for the output file.
I'm just a newbie with Talend myself, but I am solving a similar problem, and believe tUnite should work for you.
Regards from Vienna,
Richard Unger
One Star

Re: Iterate, filter, and merge into a single XML file

I tried tUnite but it generated some errors (speaking about variable that should be final in order to be accessed from an inner class => I can understand why as a Java developer but the thing I don't understand is what are these variables and where I should specify them...).
Was your project a Java project ? If so, did you encounter the same (or some) errors ?
One Star

Re: Iterate, filter, and merge into a single XML file

Hi
Yes, I am also generating for java - I'm using JasperETL 3.1.1, under linux.
I've been having a lot of problems with tUnite (see a seperate post I made a little earlier today).
In particular, I got compile errors when trying to use 2 tUnites in the same job, or when trying to access values from the row before the tUnite...
For the simple case you describe tUnite is working ok for me.
Do you refer to rows or variables within the tAdvancedFileOutputXML? Perhaps this is the problem here?
Regards from Vienna,
Richard Unger