Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I woul like to ask you if to parsing a really simple JSON String should take between 5 and 10 second wit tExtractJsonFields component.
I have this really simple json:
{
"c1": "55665",
"c2": 1757610940000,
"c3": 381685,
"c4": "28006354",
"c5": 1774479600000,
"c6": {
"c61": "5",
"c62": "N",
"c63": 0,
"c64": 60,
"c65": 60
}
}This is passed to a subjbob via context variables, so the subjob has a tFixedFlowInput that transform the context to a flow, then a tExtractJsonFields with "$" as Jsonpath query and a $.c1...c5 + $.c6.c61...c65 query for extracting each field. So the job continue with a tmap in order to compute couple of fields, and a tFileOutputDelimited to write out this row on a csv file.
Now, the time it takes to make this process is about 5 to 10 second, each time the job is called... I have another job that process a json with java code and the json.org library, and in 5 seconds it process hundreds of rows... This is the picture of the job:
So, the question is: am I making something wrong? is there something I can do to speedup the processing?
Thanks,
Luca
Hi all, thanks for the replies. After some other investingation I have found that the long time was not due to the json parsing, but to the fact that the subjob making the parser was called by a dynamic trunjob, hence the longer time was due to the compilation of the job, and not for its execution! Thanks all, and sorry for the post 🙂
hello @lucaL
It's strange that it takes 5 seconds, I reproduced the parsing of your json and it takes 0.09s
Best Regards
Hello,
When you say it takes 5 seconds , do you refer to the exec time ?
Kind regards
Denis
Hi all, thanks for the replies. After some other investingation I have found that the long time was not due to the json parsing, but to the fact that the subjob making the parser was called by a dynamic trunjob, hence the longer time was due to the compilation of the job, and not for its execution! Thanks all, and sorry for the post 🙂