Read XML and convert to CSV file using Parallel Job

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
shivam30
Participant
Posts: 1
Joined: Tue Aug 04, 2009 3:20 am
Location: IBM

Read XML and convert to CSV file using Parallel Job

Post by shivam30 »

Hi,

I tried converting some simple xml files using xml input stage and got them converted successfully in DS but there is this new complex xml i have pasted below for which i am facing problem to convert. Kindly help.

- <Node>
1J
- <Condition>
AccountDivisionID
<Property name="LeftField" value="10039" />
<Property name="Comparison" value="EqualTo" />
<Property name="CaseSensitive" value="true" />
<Property name="RightValue" value="1J" />
</Condition>
- <Node>
Other
<Comment />
- <Tariff>
AddPercentageOfAmountModifier
<Property name="InputField" value="20009" />
<Property name="ValueField" value="30001" />
<Property name="OutputField" value="20009" />
<Property name="Percentage" value="0" />
</Tariff>
- <Node>
Dedicated account 1
- <Tariff>
AddPercentageOfAmountModifier
<Property name="InputField" value="20014" />
<Property name="InputFieldIndex" value="1" />
<Property name="ValueField" value="30001" />
<Property name="OutputField" value="20014" />
<Property name="OutputFieldIndex" value="1" />
<Property name="Percentage" value="20000" />
</Tariff>
- <Tariff>
SetExpiryDateModifier
<Property name="DateField" value="20015" />
<Property name="DateFieldIndex" value="1" />
<Property name="ExtensionRule" value="1" />
<Property name="Days" value="14" />
<Property name="IfShortened" value="0" />
</Tariff>
</Node>
<Tariff>ExitTreeModifier</Tariff>
</Node>
- <Tariff>
ErrorModifier
<Property name="Id" value="20" />
</Tariff>
</Node>
- <Node>
1I
- <Condition>
AccountDivisionID
<Property name="LeftField" value="10039" />
<Property name="Comparison" value="EqualTo" />
<Property name="CaseSensitive" value="true" />
<Property name="RightValue" value="1I" />
</Condition>
- <Node>
Other
<Comment />
- <Tariff>
AddPercentageOfAmountModifier
<Property name="InputField" value="20009" />
<Property name="ValueField" value="30001" />
<Property name="OutputField" value="20009" />
<Property name="Percentage" value="100" />
</Tariff>
- <Node>
Dedicated account 1
- <Tariff>
AddPercentageOfAmountModifier
<Property name="InputField" value="20014" />
<Property name="InputFieldIndex" value="1" />
<Property name="ValueField" value="30001" />
<Property name="OutputField" value="20014" />
<Property name="OutputFieldIndex" value="1" />
<Property name="Percentage" value="833.34" />
</Tariff>
- <Tariff>
SetExpiryDateModifier
<Property name="DateField" value="20015" />
<Property name="DateFieldIndex" value="1" />
<Property name="ExtensionRule" value="1" />
<Property name="Days" value="24" />
<Property name="IfShortened" value="0" />
</Tariff>
</Node>
<Tariff>ExitTreeModifier</Tariff>
</Node>
- <Tariff>
ErrorModifier
<Property name="Id" value="20" />
</Tariff>
</Node>
- <Node>
shivam
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Looks like you need to specify a repetition element and/or split the multiple conditions into separate chunks for processing.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply