XML Stage Question...
Posted: Thu Jul 06, 2006 11:43 am
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...
[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...