XML reading from datastage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Veni
Participant
Posts: 45
Joined: Fri Oct 21, 2005 2:51 am

XML reading from datastage

Post by Veni »

Hi ,

this is my xml file i didn't give complete file ,

<?xml version="1.0" encoding="UTF-8"?>
<SEND_SUPPLIER_INVOICE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:ifsworld-com:schemas:send_supplier_invoice">
<DATA_AREA>
<INVOICE>
<invoice no>...</invoice no>
<invoice id>...</<inovice id>
<CURRENCY_CODE>USD</CURRENCY_CODE>
<CURRENCY_RATE>1</CURRENCY_RATE>
<DELIVERY_DATE xsi:nil="1"/>
<DUE_DATE>2006-11-09</DUE_DATE>
<FACTOR>1</FACTOR>
<IDENTITY_ID>NN36</IDENTITY_ID>
<INVOICE_DATE>2006-10-10</INVOICE_DATE>
</INVOICE_ACCOUNTING_ROW>
.....
</INVOICE_ACCOUNTING_ROWS>
</INVOICE_ITEM>
.....
</INVOICE_ITEMS>
....
</INVOICE>
</DATA_AREA>
</SEND_SUPPLIER_INVOICE>


This my xml , from datastage i should read this xml file based on tag... that is <invoice> tag record is treated as
001 record in target file, <invoice_accounting_row> is treated as 002 record in target file and <invoice_item>
is treated as 0003 record how do we achive this in datastage.


i tried datastage folerstage and xml input but there is no option for reading xml based on tag to spilt one row
into mulitple row...!

Please any give suggestion to solve this problem.
kalpna
Premium Member
Premium Member
Posts: 78
Joined: Thu Feb 02, 2006 3:56 am

Post by kalpna »

Hi! Veni
what is ur requirement??
is that a record or column??(001,002,003)

Kalpna
Veni
Participant
Posts: 45
Joined: Fri Oct 21, 2005 2:51 am

Post by Veni »

kalpna wrote:Hi! Veni
what is ur requirement??
is that a record or column??(001,002,003)

Kalpna
001,002,003 is record...! based on tag invoice tag should go to target as first recod , child tag Invoice_item should go to second record .
Accounting_row that will go as Third records
kalpna
Premium Member
Premium Member
Posts: 78
Joined: Thu Feb 02, 2006 3:56 am

Post by kalpna »

i think u can't acheive this in one job.
Load them into three different files and then use link collector with round-robin algorithm(default) to combine into one.

I think, it works..
Kalpna.
Post Reply