Page 1 of 1

XML Requirement

Posted: Sat Aug 31, 2013 11:44 pm
by vamsi.4a6
New to XML and input is really appreciated

Code: Select all

<STORELIST>
<ST> 
 <STOREID> 1 </ STOREID> 
 <STORENAME> ABC</ STORENAME> 
   <product> 
             <KEY_1>1</KEY_1>
             <KEY_2>2</KEY_2>
             <product1>Fan</ product1> 
             <product2>Light</ product2> 
              
   </ product>
<ST/>
<ST> 
 <STOREID> 2 </ STOREID> 
 <STORENAME> CDE</ STORENAME> 
   <product> 
             <KEY_1>3</KEY_1>
             <KEY_2>4</KEY_2>
             <product1>BALL</ product1> 
             <product2>BAT</ product2> 
              
   </ product>
<ST/>
</ STORELIST>
Like this we have Multiple ST tags which contains information about various stores and multiple products.We have composite key(KEY_1,KEY_2) in product tag.

STORELIST

o/P REQUIRED is:
STOREID STORENAME
1 ABC
2 CDE


I am able to get first o/p but not able to get below o/p Since i have composite key in PRODUCT tag and i can not select Multiple Keys in columns tab.Not sure how to proceed

PRODUCTLIST

STOREID STORENAME product1 product2 KEY_1 KEY_2
1 ABC Fan Light 1 2
2 CDE BALL BAT 3 4

Doubts:
1)whether i need to select the Repetition element required or not on Transformation setting of output tab?
2)whether i need to select the Repetition element required or not on Transformation setting of stage tab?
3)Key and Transformation settings of output tab to populate the
PRODUCTLIST Table ?

Job design:

externalsource->XML INPUT STAGE(TWO OUTPUTLINKS)-->ONE LINK TO STORELIST AND ANOTHER LIST TO PRODUCTLIST

Posted: Sun Sep 01, 2013 12:49 pm
by eostic
Looks like one single list of stores ---- so one output link......not two....(The products are named uniquely as product1 and product2 in their tagnames ---- get them out of xml as separate columns and then pivot them downstream if you need two rows for every store.