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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mani1304
Creator
Creator

Split the file and convert to json/xml

Hi All,

We have flat files, which have 4 types(A,B,C,D) and B,C,D can come multiple/no times and can have multiple orders, each order ending with

ENDORDER.

Now files

are supposed to

separate each record and after converting it into

json/xml

with base64 encryption need to push into a queue. Now the main problem is coming in converting that thing because we are having multiple/no B,C,D.

e.g.

A|1|2|3|4

B|1|2|3|4|5|6

C|1|2|3

D|1|2|3|4|5

ENDORDER

A|1|2|3|4

B|1|2|3|4|5|6

B|1|2|3|4|5|6

C|1|2|3

C|1|2|3

C|1|2|3

D|1|2|3|4|5

ENDORDER

A|1|2|3|4

B|1|2|3|4|5|6

B|1|2|3|4|5|6

B|1|2|3|4|5|6

B|1|2|3|4|5|6

now it will have 3 orders as below

A|1|2|3|4

B|1|2|3|4|5|6

C|1|2|3

D|1|2|3|4|5,

A|1|2|3|4

B|1|2|3|4|5|6

B|1|2|3|4|5|6

C|1|2|3

C|1|2|3

C|1|2|3

D|1|2|3|4|5,

A|1|2|3|4

B|1|2|3|4|5|6

B|1|2|3|4|5|6

B|1|2|3|4|5|6

B|1|2|3|4|5|6

Can someone please suggest?

Labels (4)
2 Replies
Ravi_Rajagopal
Contributor III
Contributor III

If I interpreted this correctly I think the expectation was

A|1|2|3|4

B|1|2|3|4|%|6

C|1|2|3

D|1|2|3|4|5

 

Is the above your expectations as well ?

mani1304
Creator
Creator
Author

no, it need to split, whenever an ENDORDER comes and convert that into a json/xml message to push into a UM queue, means output message would be same as input flat file record till ENDORDER, no addition or break.

Hope it clarifies the question.