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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Stop reading rows from Input (csv or excel) when field "end" = "x"

How can I stop reading rows from a input file (csv or excel) when a field has a certain value?
So if in field "end" the value is "x" I would like stop/interupt reading new rows from the input.
The Job should not end with a error.
Thank you for your help 🙂
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hello
Here is simple demo job, the tFileInputFullRow extract all the records from the source file:
source file:
a
b
c
x
c
d
result:
Starting job forum13857 at 16:35 20/01/2011.
connecting to socket on port 3783
connected
a
b
c
x
disconnected
Job forum13857 ended at 16:35 20/01/2011.

Best regards
Shong

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Hello
It is impossible to stop reading the new row from the input component, but we can stop it when a fileds end with 'x' on tJavaRow component, so need to read all the rows from file and filter/process on tJavaRow.
Best regards
Shong
Anonymous
Not applicable
Author

Hello Shong,
so how would I Skip all following lines when I see the first apereance of the string "x" in row1?
Would I have to use a variable to do this?
Greetings
Roger
Anonymous
Not applicable
Author

Hello
Here is simple demo job, the tFileInputFullRow extract all the records from the source file:
source file:
a
b
c
x
c
d
result:
Starting job forum13857 at 16:35 20/01/2011.
connecting to socket on port 3783
connected
a
b
c
x
disconnected
Job forum13857 ended at 16:35 20/01/2011.

Best regards
Shong
Anonymous
Not applicable
Author

Hello Shong,
This is exacly what I was looking for. 0683p000009MACn.png
Many thanks for this quick response.
Greetings
Roger
Anonymous
Not applicable
Author

Will the tFileInputFullRow read all the lines in the file in here??? if that is the case then it will consume time in reading the file right, which is not an efficient way