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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dynamic headings in tfileinputdelimited

Hi All,
I need to be able to get tfileinputdelimited to read a string as header instead of a row number. My file I'm trying to input has a header called "Start-of-data" and I want the component to start using data from this header. 
Currently the header field only accepts row number. How can I get it to accept anyhting else.
Thanks,
Oliver

Labels (2)
6 Replies
Anonymous
Not applicable
Author

Hi,
I need to be able to get tfileinputdelimited to read a string as header instead of a row number. My file I'm trying to input has a header called "Start-of-data" and I want the component to start using data from this header.

Could you please elaborate your case with an example with input and expected output values?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi,
I need to pass data in the below file to another component. I'm using  tfileinputdelimited component and want it to start at the header 'Start-of-data' in the file. I cannot insert a string into the HEADER option on the  tfileinputdelimited component, only a row number.
How can I tell this component to start processing from the 'START-OF-data' row within the file (ie at row 34)  
test_input.txt.txt
TRF
Champion II
Champion II

Hi,
You cannot have anything else that a number in Header field.
For your use case you need to read the input file once to memorize the line number where the key word " START-OF-DATA" appears.
This line number must go to a context variable (lets says HearderLines for example).
After that, you can read the file again using a tFileInputDelimited in which Header field contains context.HeaderLines.
Is it what you expect?
Regards,
TRF
Anonymous
Not applicable
Author

Hi,
Great, thanks for that. What components would you use to count number of rows in a file?
Regards,
Oliver
Anonymous
Not applicable
Author

Hi,
Here is  TalendHelpCenter:tFileRowCount component which is used to  count the number of rows in a file.
Best regards
Sabrina
cterenzi
Specialist
Specialist

I think you can achieve this with a tFlowToIterate into a tJava that tests the row for "[color=#000000]START-OF-DATA", saves the row number to a global variable and then breaks the loop. (for a loop break example, see topic: [topic]17120[/topic])[/color]