XML output stage
Posted: Wed Apr 01, 2009 2:07 pm
We have a datastage job which uses xml output stage. We are facing an issue while generating the output.
input data
Cust_id Cont_usage Cont_usg_text Cont_no
0001 2 Telephone 723652845894
0001 2 Telephone 893282983484
0001 3 Mobile 089148948329
0002 2 Telephone 231341414144
0002 4 Fax 231341414144
output from XML stage
<Service>
<cust_id>0001</cust_id>
<contactmethodtype>
<cont_usage>2</cont_usage>
<contactmethod>
<cont_no>723652845894</cont_no>
</contactmethod>
</contactmethodtype>
<contactmethodtype>
<cont_usage>2</cont_usage>
<contactmethod>
<cont_no>893282983484</cont_no>
</contactmethod>
</contactmethodtype>
<contactmethodtype>
<cont_usage>3</cont_usage>
<contactmethod>
<cont_no>089148948329</cont_no>
</contactmethod>
</contactmethodtype>
</Service>
<Service>
<cust_id>0002</cust_id>
<contactmethodtype>
<cont_usage>2</cont_usage>
<cont_usage>4</cont_usage>
<contactmethod>
<cont_no>231341414144</cont_no>
</contactmethod>
</contactmethodtype>
</Service>
when the cont_no is same (231341414144) with a different cont_usage (2, 4) for cust_id - 0002 we are getting only one row it should have 2 output rows for cont_no similar to output of cust_id - 0001.
I have specified cont_no as "Key" and specified output as "Single row" in XML output stage and are using 2 xml stage to get the output
Any suggestions
Magesh S
input data
Cust_id Cont_usage Cont_usg_text Cont_no
0001 2 Telephone 723652845894
0001 2 Telephone 893282983484
0001 3 Mobile 089148948329
0002 2 Telephone 231341414144
0002 4 Fax 231341414144
output from XML stage
<Service>
<cust_id>0001</cust_id>
<contactmethodtype>
<cont_usage>2</cont_usage>
<contactmethod>
<cont_no>723652845894</cont_no>
</contactmethod>
</contactmethodtype>
<contactmethodtype>
<cont_usage>2</cont_usage>
<contactmethod>
<cont_no>893282983484</cont_no>
</contactmethod>
</contactmethodtype>
<contactmethodtype>
<cont_usage>3</cont_usage>
<contactmethod>
<cont_no>089148948329</cont_no>
</contactmethod>
</contactmethodtype>
</Service>
<Service>
<cust_id>0002</cust_id>
<contactmethodtype>
<cont_usage>2</cont_usage>
<cont_usage>4</cont_usage>
<contactmethod>
<cont_no>231341414144</cont_no>
</contactmethod>
</contactmethodtype>
</Service>
when the cont_no is same (231341414144) with a different cont_usage (2, 4) for cust_id - 0002 we are getting only one row it should have 2 output rows for cont_no similar to output of cust_id - 0001.
I have specified cont_no as "Key" and specified output as "Single row" in XML output stage and are using 2 xml stage to get the output
Any suggestions
Magesh S