Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Lorenzo5
Creator
Creator

How to iterate on tFileInputFullRow rows?

Hi,

 

I have a tFileInputFullRow followed by a tHashOutput component. 

If they are linked by a row link, then tHashOutput component makes available their hash when all the rows have been read.

I need an iterations on the rows, in the way that the tHashOutput component makes available data row by row.

 

I have tried in this way:

tFileInputFullRow ---iterate---> tIterateToFlow ---row---> tHashOutput 

but I'm not able to configure the tIterateToFlow, because I don't know which global variable contains the row, row by row, from tFileInputFullRow component.

 

Can you help, please?

 

Regards,

Lorenzo

 

 

Labels (1)
23 Replies
Anonymous
Not applicable

Here is a simple example of what you need to do to iterate from a flow as you have described.....

 

0683p000009LuaK.jpg

The data is read from the same component as you are using.

The tJavaFlex simply uses a basic splitter to split the data into columns.

The tFlowToIterate converts the row into sets of globalMap varaibles.
The tFixedFlowInput is triggered by the Iterate link. You can see the number of rows that are shown on the links. 4, 4, 4 and then 1. That tells you that the file to the tJavaFlex have had all 4 rows sent as a normal flow. The same between the next two components. We then have 4 occurrences of the Iterate link fired. But after that we see that 1 row has fired. This is indicating that 1 row has fired 4 times.

The tFixedFlowInput makes use of the globalMap variables that are created by the tFlowToIterate.

hanoijolly
Contributor
Contributor

Hi @rhall , 

 

I thank you very much for your answers to this post, it helped me understand some tricks about a situation I face. Unfortunately, applying this method ends-up always with a "out of memory" for me. 
My use case is that I have a fairly large XML file with multiple rows. From that file I only need to create 1 file per row containing one of the columns. 

 

I tried your method but it seems the tIterateToFlow tries to load the whole XML file in RAM before throwing the parts after the iteration. 

Is there a way to tell Talend to : 

- take one row

- do a processing on it

- free its memory

- go on with the next row

 

I thank you all in advance for your answer.

Best regards. 

Anonymous
Not applicable

Hi @hanoijolly, this doesn't sound like the same problem as the one being answered here. We try to keep posts separate so that others can stand a chance of finding a solution from the post titles. Would you mind posting the question as a new post with a bit more detail? Thanks

hanoijolly
Contributor
Contributor

@rhallhank you for the advice, I will do it right on. Reading the initial post, I thought my issue was very close to that problem, this is why I did not open a new thread.