Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
JackStrong
Contributor
Contributor

[JSON files] Parsing and splitting huge json file

Hi.

Last time I faced a lot of issues regarding parsing and splitting a big json files. Big means let's say array of the 100 000 documents.

The requirement is to split one big file into a lot of small files (one file per one document) plus some not complecated transformations.

When I tried to implement it based on the tFileInputJSON/tFileOutputJSON component it took many hours because iteration link was there (splitted files need to be named based on the key value (id) ).

This is why I changed approach and implemented whole parsing and splitting process based on the java code (tJavaRow component).

I know that this is not elegant but it takes much less time (more less 3 minutes).

Here is the issue - 3 minutes for stakeholders is still too long.

I use the org.json library.

Can anyone propose some different approach or different java library to improve the performace?

I'm not a java developer so I'm afraid that very complicated java libraries can be chalenging for me.

Regards.

Labels (3)
2 Replies
David_Beaty
Creator III
Creator III

Hiya

 

Hopefully it wont be too complex, but consider using the tJavaFlex component to split out the single big JSON into smaller/more manageable chunks.

 

This link might help you.

 

Thanks

 

David

Anjali3
Contributor
Contributor

Please share the sample code of parsing and splitting the JSON file in java component.@Michal Swiniarski​