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

[resolved] Breaking up a file by lines using cSplitter

Hello,
I have a Route which loads a file with a cFile component. At this point I would like to process a seperate message for each line in the file. I have been trying to do this using the cSplitter component but so far I still just get one message with the entire file contents. It seems like I must be missing something obvious, can anyone help me?
Thanks!
Drew
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Thanks Edward, the example code helped get me started. I needed to use body(String.class).tokenize("\n") as the Expression for my cSplitter component.

View solution in original post

2 Replies
Anonymous
Not applicable
Author

There is an example of using splitter with a text file here https://community.talend.com/t5/Design-and-Development/Recover-data-stream-in-talend/td-p/61474 . A bit complex for your case but you can download the example and it should answer your question.
Anonymous
Not applicable
Author

Thanks Edward, the example code helped get me started. I needed to use body(String.class).tokenize("\n") as the Expression for my cSplitter component.