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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to parse a fixed length using tFileInputPositional component with its Pattern option.

i tried to parse a fixed length file. File sample data is:

GClog OP 00000099140001047454 2018-10-26 0

length pattern is:2,5,30,12,6.

I want to parse above line like this: GC;log;OP;00000099140001047454;2018-10-26;0

For getting output like above, i have first tried to simply parse the fixed length file first using this job:0683p000009M2t7.png5 Rows are processing

Schema description: as every time schema is keep on changing and file having multiple lines also, so i tried to define schema as line only.like this:0683p000009M37T.png

when i ran this job,output is :

0683p000009M39J.png

as in first image it is showing that 5 rows processing, while in tLogRow it is displaying only one row record. Why it is displaying only one record not all.

 

So kindly help me where i am doing mistake and a s i mentioned we do not ahve any fixed schema so we can not use Filepositional metadata option. Thanking you in advance. Kindly guide me and help me.

Labels (2)
11 Replies
vapukov
Master II
Master II

the simplest way (possible may be another, but this is easy to implement)

 

  • read file and iterate row by row
  • based on RunIf trigger append row to 1 from 5 files
  • run 5 subjobs - 1 for each pattern

it is not a universal solution, but it could be designed very fast and it will work

you can add one more filter - not matched to any of patterns and store rejected rows for future analysis 

 

Anonymous
Not applicable
Author

I have implemented, but still not able to parse the fixed length file. Still same issue persists , on the basis of length pattern it is only reading 1 record .Not able to cross this barrier.can you ponder and showed me a designed job using length pattern for already shared fixed length file to delimiter file. Looking forward for your guidance.