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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Read a input file without '\n'

Hi, 

I need to read a file which not contains '\n'. It looks like :

"first field 1 second field 1 first field 2 second field 2 first field 3 second field 3 first field 4 second field 4....."

I have to put this file in two columns like this:

column 1                  column 2

first field 1                 second field 1

first field 2                 second field 2

first field 3                 second field 3

 

This is fixed field but I can't use t File input Positional object because my file doesn't contains separator of lines like '\n'.

 

Can you help me please?

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Thank you very much for your help!

 

I try your method but finally I was easier to use a t-Java-Flex to read my file in stream, line by line as I wanted. After I used a t-map with some functions that I wrote in Java as a routine to separate each line in 2 columns.

 

 

 

View solution in original post

2 Replies
TRF
Champion II
Champion II

You tFileInputRaw to get the content, then you need to split the input every n characters (see String.split() method) and push the result to a file you can now read as a positional file.
That's the general idea.
Anonymous
Not applicable
Author

Thank you very much for your help!

 

I try your method but finally I was easier to use a t-Java-Flex to read my file in stream, line by line as I wanted. After I used a t-map with some functions that I wrote in Java as a routine to separate each line in 2 columns.