Page 1 of 1
TI Process to load all children
Posted: Wed May 14, 2014 5:13 am
by sathishh.mk
Hi,
I am trying to create a TI Process to load all children of consolidated source data.
Requirement:
My source data is at Consolidated level and i need to load the same data in cube at all children's of specified consolidated Level.
Ex: Source data:
Product Revenue
1001 1000
Product can have two (or) more children and load the revenue(1000) data against those childrens of product(1001)
Need suggestions on this.
Regards,
Sathish
Re: TI Process to load all children
Posted: Wed May 14, 2014 12:25 pm
by jim wood
Have you looked through the refernce guide for commands that might help you before asking? I'll give you a clue: ELCOMPN, ELCOMP,
Jim.
Re: TI Process to load all children
Posted: Wed May 14, 2014 2:39 pm
by sathishh.mk
Hi Jim,
Thanks for reply..
Yes, We are trying with ELCOMPN, ELCOMP functions only, the concern is,one product can have multiple children.
So we are trying to get the number of children of specified product and trying to loop those my times.
But we are unable to achieve the same as all these should be dynamic and run time in TI process load.
Regards,
Sathish
Re: TI Process to load all children
Posted: Wed May 14, 2014 2:59 pm
by jim wood
ELCOMPN tells you the number of children. Use a while loop constrained by that number. Use a subset as the datasource containing each product so the while loop applies to every child. Your only concern is if a child has multiple parents.
Re: TI Process to load all children
Posted: Wed May 14, 2014 3:56 pm
by sathishh.mk
Hi Jim,
Can you please shed light on the below..as my datasource is CSV File.
Use a subset as the datasource containing each product so the while loop applies to every child.
Regards,
Sathish
Re: TI Process to load all children
Posted: Wed May 14, 2014 4:38 pm
by Wim Gielis
You do not need a subset as the datasource.
Within the Advanced > Data tab of you process, make a loop over all (ELCOMPN) children (ELCOMP) or a given consolidated member.
Write the data (CELLPUTN) on each of those children, if they are level 0 in the dimension.
Re: TI Process to load all children
Posted: Wed May 14, 2014 6:46 pm
by jim wood
sathishh.mk wrote:Can you please shed light on the below..as my datasource is CSV File.
Use a subset as the datasource containing each product so the while loop applies to every child.
I put that in there as I didn't know what your data was, other than being at the consolidated level.
Re: TI Process to load all children
Posted: Wed May 14, 2014 7:17 pm
by declanr
Code: Select all
nComp = ElCompN ( sDimProduct, vProduct );
nRev = vRevenue \ nComp;
iCount = 1;
iMax = nComp;
While ( iCount <= iMax );
sProductChild = ElComp ( sDimProduct, vProduct, iCount );
CellPutN ( nRev, sCub, v1, v2...., sProductChild, 'revenue' );
iCount = iCount + 1 ;
End;
I am guessing the OP is struggling with the concept so this may help, it is assuming you want an equal spread.
The code may have issues as I've written this on my phone.
Re: TI Process to load all children
Posted: Fri May 16, 2014 7:26 pm
by sathishh.mk
Thanks declanr and Jim !!!
The below code working fine and exactly fitted for my requirement.
Really really thanks for help.
Regards,
Sathish