XML Output

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

XML Output

Post by Nagaraj »

WS is outputting 5 rows with suppose 10 columns
The output i get is just one row with each column getting values from 5 rows and this happens for each column.
so column data is getting appended.

Job design


WS_Client---->Copy---->TFM--->WS_TFM--->TFM--->DataSet


Here Client which accepts login ID and it uses this iD and in the first transformer i mention the time period
i get the time sheet data in the final dataset.

How do i get the data into tabular format into the file so that i add this to Database table?
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post by Nagaraj »

Sample output data

Col1 Col2
1 2 3 2012-09-122012-02-042012-06-05
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

might depend on what the service is sending back.

Have you fully tested it in a tool like SOAPui? That's a good idea so that you can get very familiar with the payload that the service returns.

Another good thing to do is to copy your job, then put one column on the output link from the WSClient....delete all the others.....send the link to a sequential stage with NONE/NONE for delimieter and quote character....in that single column, which should be a varchar and a long length, put a single "/" in the Description.

Alternatively, you should be also able to go to the "message" tab and pick your single large column in the pull down that says "user defined message".

Now look at the resulting data in the sequential file. is it xml? is it something else? These days you might get XML in SOAP, or REST, or you might even get a chunk of JSON. Mostly likely it is soap, and has an array in it....if so, you "may" need to ultimately pass that soap envelope to an xmlInput Stage and parse out the data and rows you are looking for.

Let's first find out what it is sending you.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Nagaraj
Premium Member
Premium Member
Posts: 383
Joined: Thu Nov 08, 2007 12:32 am
Location: Bangalore

Post by Nagaraj »

Thank you, I output the whole chunk to a sequential file and reprocessed it using XML input stage and parsed the data. But looks like the soap response i see in the UI tool has data which can go to multiple tables. how to read this and load it to three different tables?
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

....each repeating "node" of the xml document gets its own output link.....leading to a different relational table.

Work with your output file and get that to work, and then you can tie them together in the same Job.

Ernie
Ernie Ostic

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