I have a XML file like this...
[code]<?xml version="1.0" encoding="UTF-8"?>
<insertRow subName="XPUB_FinTrx" srcOwner="DEV1" srcName="FINANCIAL_TRANSACTION">
<col name="ID" isKey="1">
<bigint>
<afterVal>1</afterVal>
</bigint>
</col>
<col name="CCID">
<varchar>
<afterVal>DUE</afterVal>
</varchar>
</col>
<col name="AMOUNT">
<decimal>
<afterVal>56.25</afterVal>
</decimal>
</col>
<col name="CC">
<char>
<afterVal>USD</afterVal>
</char>
</col>
<col name="EXT_REF">
<varchar>
<afterVal xsi:nil="1"/>
</varchar>
</col>
</insertRow>
[/code]
I can process this XML file using Column Description of XML Input stage and get output file like this...
[code]
SubName SrcOwner SrcName Name Value
--------------------------------------------------------------------------------------
XPUB_FinTrx DEV1 FINANCIAL_TRANSACTION ID 1
XPUB_FinTrx DEV1 FINANCIAL_TRANSACTION CCID Due
XPUB_FinTrx DEV1 FINANCIAL_TRANSACTION AMOUNT 55.55
XPUB_FinTrx DEV1 FINANCIAL_TRANSACTION CC USD
XPUB_FinTrx DEV1 FINANCIAL_TRANSACTION EXT_REF 1
[/code]
But I am just wondering if there is any way I can get the output like this...
[code]
XPUB_FinTrx DEV1 FINANCIAL_TRANSACTION 1 Due 55.55 USD 1
[/code]
I would like to know if I can do this withink XML or any other ways to do it...I read some post about vertical pivots but I could not make it to work...
I appreciate your ideas...
XML Stage Question...
Moderators: chulett, rschirm, roy
Hi,
Running those line via a transformer stage and concatenating the info, outputing it to a hashed file stage with the first part as key would result in the desired output row.
Naturally you'll also nee some stage variable to check when you changed your ID and such...
IHTH,
Running those line via a transformer stage and concatenating the info, outputing it to a hashed file stage with the first part as key would result in the desired output row.
Naturally you'll also nee some stage variable to check when you changed your ID and such...
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Seems I must have missunderstood your question at that time
Glad you found the solution on your own![Smile :)](./images/smilies/icon_smile.gif)
(You could have also used the folder stage, but I prefer the xpath as well)
![Embarassed :oops:](./images/smilies/icon_redface.gif)
Glad you found the solution on your own
![Smile :)](./images/smilies/icon_smile.gif)
(You could have also used the folder stage, but I prefer the xpath as well)
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)