Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 !!
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 :
MyJob
tFlowToIterate
Json
tUniqueRow
Hello,
Could you please elaborate your case with an example with input and expected output values?
Best regards
Sabrina
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.
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 :
MyJob
tFlowToIterate
Json
tUniqueRow