My real time job does not return the nested JSON format data

Dedicated to DataStage and DataStage TX editions featuring IBM<sup>®</sup> Service-Oriented Architectures.

Moderators: chulett, rschirm

Post Reply
yliu@mitre.org
Premium Member
Premium Member
Posts: 3
Joined: Fri Feb 27, 2015 1:41 pm

My real time job does not return the nested JSON format data

Post by yliu@mitre.org »

Hi,
1) my real time job design is "IDS input -> lookup stage with sparse type -> XML stage -> ISD output'
Sample Output result:
[{"name":"Econ Analysis & Acquisition Mg","specialties":["Risk Management","Business and Investment Analysis","Contracting Analysis","Program Management [Acquisition]","Cost Analysis","Economic Analysis","Financial Management Analysis","Economic Modeling","Econometrics","Benefit Cost Analysis","Health Economics"]}]

After deploying in ISD console, I run it in the browser. The first time, I got the result as the same as the above. BUT when I run it in the Browser the second time, I got the wrong data like this:
[{"name":"Econ Analysis & Acquisition Mg"},{"name":"SW Eng, Comp Sci & Mathematics"}]

Can anyone know why?

2) If I make it as a batch job, I do not have such issue. But batch job is slower than the real time job.

Thank you in advance!
Jane
Jane liu
atul9806
Participant
Posts: 96
Joined: Tue Mar 06, 2012 6:12 am
Location: Pune
Contact:

Post by atul9806 »

What is your output array properties ?
~Atul Singh
<a href=http://www.datagenx.net>DataGenX</a> | <a href=https://www.linkedin.com/in/atulsinghds>LinkedIn</a>
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Hard to say. Could be lots of things. For initial debugging, I would have you put a transformer after the xml stage, and split the output into two places....first to a sequential file (use "NONE" for delimter and for quote character) and then the other link to ISDoutput.

[you can make that change fairly simply, by "disabling" the service, change and recompile the Job and then "re-enable". You don't have to entirely un-deploy, provided that your output link to ISDoutput remains the same in terms of columns and structure].

Then see what goes to the sequential file. Hard to say what this would be, based on your description, but it looks like for some reason your sparse lookup is failing. Be sure it is truly sparse so that it is doing SQL each time, per row/per request. This is a requirement of lookups in ISD jobs (and no funnels or other complex scnearios that require initial reading of a 'file' as I/O --- ONLY the ISDinput link can be the DRIVER of the job).

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply