Page 1 of 1

Updating the Dimension issue

Posted: Mon Aug 25, 2014 5:34 am
by krithika331
Hi,

I have a dimension which needs to be updated with the Leaf level values, which are to be retrieved from a load file. These leaf level values are basically coming from a different table and accessed in TI process to update the existing dimension. To arrange under the parent values, I have created a string attribute with the 2 postions of the leaf level and matching with the elements coming from load file. Can I consider only one TI process in accessing the load file values and also the putting under the parent elements. Any ideas??

Re: Updating the Dimension issue

Posted: Mon Aug 25, 2014 7:35 am
by lotsaram
krithika331 wrote:... Can I consider only one TI process in accessing the load file values and also the putting under the parent elements. Any ideas??
Yes. 1st idea; try to express your question in a way that someone else has some chance of comprehending what it is you are asking. Then you might have some chance at least.

Re: Updating the Dimension issue

Posted: Mon Aug 25, 2014 9:24 am
by Wim Gielis
krithika331 wrote:Any ideas??
No. See Lotsa's post. I cannot suggest anything when I read your post. Even not after reading it 5 times.

Re: Updating the Dimension issue

Posted: Mon Aug 25, 2014 11:00 am
by rmackenzie
krithika331 wrote:Hi,

I have a dimension which needs to be updated with the Leaf level values, which are to be retrieved from a load file. These leaf level values are basically coming from a different table and accessed in TI process to update the existing dimension. To arrange under the parent values, I have created a string attribute with the 2 postions of the leaf level and matching with the elements coming from load file. Can I consider only one TI process in accessing the load file values and also the putting under the parent elements. Any ideas??
Are you saying that you have 1 table for the parents and 1 table for the leaves and currently have 2 TI processes to 1. load parents and then 2. attach leaves to parents based on the attribute? If so, then if you are using an ODBC data source then you could look at using a JOIN statement to combine the two tables so that the parent, child and implied relationship is all combined into one new view. Then have a single TI process read that information and you will then be able to insert parents, children and add the children to parents in a single process.

Re: Updating the Dimension issue

Posted: Tue Aug 26, 2014 7:21 am
by krithika331
Sorry for the confusion. What I meant actually was that the standard dimension is already present and while loading the data for some measures in the Cube, the Data load file is coming from a different database and to avoid the Loading error for some elements, in metadata I had written the code to update the dimension elements and then load. But I don't want to do this way, instead update the dimension initially with the elements present in different database, (extracted leaf values to file) and update the dimension and then run the Cube Load process.

So to exactly put the leaf values(coming from file) under the existing parents , I have to consider the string attribute with 2 positions of the leaf values assigning to the parent elements and matching with the elements coming from load file. Can anyone please tell me.

Re: Updating the Dimension issue

Posted: Tue Aug 26, 2014 10:25 am
by lotsaram
krithika331 wrote:Sorry for the confusion. What I meant actually was that the standard dimension is already present and while loading the data for some measures in the Cube, the Data load file is coming from a different database and to avoid the Loading error for some elements, in metadata I had written the code to update the dimension elements and then load. But I don't want to do this way, instead update the dimension initially with the elements present in different database, (extracted leaf values to file) and update the dimension and then run the Cube Load process.

So to exactly put the leaf values(coming from file) under the existing parents , I have to consider the string attribute with 2 positions of the leaf values assigning to the parent elements and matching with the elements coming from load file. Can anyone please tell me.
What would be helpful is if you were to give an example of the format of the file you are using and to indicate whether it is possible to include a field (or deduce) the parent of any new element included in the load file.

If using 10.1 or 10.2 then you don't need to use the metadata tab to insert elements that need to be added and avoid errors as the direct functions can be used on the data tab before the CellPut.

Code: Select all

IF( DimIx( cDim, vEle ) = 0 );
  DimensionElementInsertDirect( cDim, '', vEle, 'N' );
  DimensionElementComponentAddDirect( cDim, vPar, vEle, 1 );
EndIF;
If the information to map to the correct parent isn't immediately available during the data load this doesn't matter as all that is needed to avoid the "element does not exist in dimension" error is to insert the leaf element. The mapping can be done later.

Re: Updating the Dimension issue

Posted: Tue Aug 26, 2014 11:09 am
by BariAbdul
Thanks lotsaram ,So it is fair to conclude that we still have to use metadata tab for inserting elements and direct element functions can't be used in data tab.Thanks

Re: Updating the Dimension issue

Posted: Tue Aug 26, 2014 11:38 am
by declanr
BariAbdul wrote:Thanks lotsaram ,So it is fair to conclude that we still have to use metadata tab for inserting elements and direct element functions can't be used in data tab.Thanks
Think you've got a little mixed up there, what Lotsa was saying is that you CAN use the direct functions on the data tab, that's the whole point in them having been introduced (as long as you are using a version 10+.)