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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tLoop on a tFileInputDelimited : loop number of rows

Hello
I put a tLoop on a tFileInputDelimited component in order to loop on it. For the tLoop component, there is a "to" param to define (default value : 10). If I have a non deterministic number of row in the tFileInputDelimited, how can I define the "to" param of tLoop in order to loop at least the number of the row that we have in the file?
thks
Valery
Labels (2)
8 Replies
Anonymous
Not applicable
Author

Hi,
Use tFileProperties to find the number of rows in your file.
Good luck
Anonymous
Not applicable
Author

Hi,
Not sure what you are trying to do here. The file gets read row by row for all rows in it, you don't need a loop there. Can you explain the need for the loop?
Regards,
Arno
Anonymous
Not applicable
Author

Correct Arno, I did not understand why at the begin. Effetively tFileInputDelimited read row by row.
but in https://community.talend.com/t5/Design-and-Development/how-to-add-an-empty-row/td-p/114679 they are using it. I don't really understand why but it runs.
Valery
Anonymous
Not applicable
Author

Okay, in case you want to add rows like in that case I get it.
Using tFileProperties, like saukema suggested, is the correct solution i suppose.
Regards,
Arno
Anonymous
Not applicable
Author

Arno,
If you get it, could you explain it me brievely?
thks
Valery
Anonymous
Not applicable
Author

unfortunately ((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) is null when I am launching the job. Any idea?
Valery
Anonymous
Not applicable
Author

Hi Valery,
Still unsure about what you are trying to achieve here. Do you just want to replicate what's done in the other thread, or do you have a need to insert empty rows?
Regards,
Arno
Anonymous
Not applicable
Author

Hello
Insert an empty row
Valery