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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

decompose the contents of a JsonFile and to multiple file Output

Hi , 

I want to extract  data from a  json file and output separately blocks  to multiple file json .

For exemple : in the input i have a jsonfile that contains 3 users (toto,popo,momo) , I want to have in the output 3 jsonFile  and each one have only one user => f1.json (toto) 

                                                     f2.json (popo)

                                                       f3.json (momo)

Any help please !! 

 

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Finally i found solution and it works for me , I will put it with screen shots  for any other use : 

So this is my final job :  

0683p000009Lzhm.pngMyJob0683p000009Ly0H.png0683p000009Lzcw.pngtFlowToIterate0683p000009LzhS.pngJson0683p000009Lzka.pngtUniqueRow0683p000009LzRo.png

 

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hello,

Could you please elaborate your case with an example with input and expected output values?

Best regards

Sabrina

iamabhishek
Creator III
Creator III

You need to design your job such that when you read your input json using tFileInputJSON you would be transforming your data for every user as separate rows. Then pass that to tIterateToFlow so that you could iterate on the input data (in your case three rows) repeatedly. Connect a tRunJob to your  tIterateToFlow.

Parent Job Layout - 

tFileInputJson -> main -> tIterateToFlow - > tRunJob

 

Now in your child job you would be reading the data that has passed for each iteration and pass them over to tFileOutputJSON to create different Json file for each iteration.

Child Job Layout - 

tFixedFlowInput - > main - > tFileOutputJson.

You could use context variables to store the values and use them to pass over from parent to child job.

 

 

Anonymous
Not applicable
Author

Finally i found solution and it works for me , I will put it with screen shots  for any other use : 

So this is my final job :  

0683p000009Lzhm.pngMyJob0683p000009Ly0H.png0683p000009Lzcw.pngtFlowToIterate0683p000009LzhS.pngJson0683p000009Lzka.pngtUniqueRow0683p000009LzRo.png