Loading Data from Database by checking contributor status

Post Reply
anoops81
Posts: 101
Joined: Tue May 12, 2009 8:20 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: Office 2010

Loading Data from Database by checking contributor status

Post by anoops81 »

Hi All ,

We load data into a cube from DB and then users will edit it and approve it via contributor workflow hierarchy . The data in the DB gets refreshed every 3 hours and the same has to be bought into the cube with the condition that data with "locked" status in contributor should not be over written by the TI process which refreshes the cube from DB . They need to preserve the locked data without change . Since TI process for refresh is running as admin , all the data will get overwritten.

I checked the tp_control cubes which were created by default for contributor processes and found the cube which stores the flag values for each state of the node , like 4 is locked , 2 is committed. This control cube has some garbage extension to it .

Will it be fine if I pull the flag info from this control cube to the TI process as a check before the data load ?


Need your suggestion on this .


Regards
Anoop
Andy Key
MVP
Posts: 352
Joined: Wed May 14, 2008 1:37 pm
OLAP Product: TM1
Version: 2.5 to PA
Excel Version: Lots
Location: Sydney
Contact:

Re: Loading Data from Database by checking contributor statu

Post by Andy Key »

This control cube has some garbage extension to it
'Garbage' might be a bit strong. It is the unique ID of the application, and is a value of the }tp_applications dimension. It is this 'Garbage' that allows you to have multiple applications defined against the same server.

Having said that, Yes you can use the State measure in the }tp_application_state}{Garbage} cube. Note that this value is stored as a string even though it looks like a number. I'm not sure I would limit myself for checking for a State of '4' though. What if I have just spent 30 minutes entering my data, am just about to hit the Submit button and your process comes along and invalidates all my changes because I had a State of '2' (which is Work in Progress, not committed).
Andy Key
anoops81
Posts: 101
Joined: Tue May 12, 2009 8:20 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: Office 2010

Re: Loading Data from Database by checking contributor statu

Post by anoops81 »

Hi Andy ,

I was thinking the extension of }tp_state_validation cube was garbage , Now understood that it is a unique id created for the contributor application .

Actually e users needs to edit only 6 fields in the cube , so they will be doing it fast I believe . Otherwise we will check the status of other node_info elements also .

I am actually confused on how to link the lock_status flag info with the database data . I have created a control cube "lock_status" and pulled the lock status info from }tp_state_validation_ID cube .

I have written it as below

Code: Select all

vflag=cellgets('lock_status','US','state');
asciioutput('C:\test.cma',vflag);
IF((Vflag@='0')%(Vflag@='1') % (vflag@='2') % (vflag@='3'));
asciioutput('C:\result.cma','Node is not locked');
ELSE ;
asciioutput('C:\result.cma','Node is locked');
ENDIF;
But the code is written for a single node element named "US" . But I need to make it check for all the elements of the 'plan_business_unit' dimension and for each of the row pulled by the TI .


Regards
Anoop
anoops81
Posts: 101
Joined: Tue May 12, 2009 8:20 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: Office 2010

Re: Loading Data from Database by checking contributor statu

Post by anoops81 »

Hi All ,

I wanted to know whether it is possible to "lock" a particular element via TI process so that no data can be written to that element . I tried to implement it with rules in the element security control cube but ADMIN was able to edit the cells , of course Admin is supposed to have all rights.

When manually changed the particular dim element to "LOCK" ( By right click on the element and then -->Security -->Lock ,ADMIN was not able to write into the cell. Is it possible to do the same process via a TI function ?


Anoop
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Loading Data from Database by checking contributor statu

Post by tomok »

anoops81 wrote:I tried to implement it with rules in the element security control cube but ADMIN was able to edit the cells , of course Admin is supposed to have all rights.
If a cell is locked even an admin can't change it. Did you refresh security after applying the "LOCK" value via the rule?
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
anoops81
Posts: 101
Joined: Tue May 12, 2009 8:20 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: Office 2010

Re: Loading Data from Database by checking contributor statu

Post by anoops81 »

Hi Tomok,

I have created a element security cube for dim actvsbud in PData .wrote the following rule for the cube ,

Code: Select all

[]=S:IF(1=2,continue,'lock');
Did security refresh and when i checked in element security assignment (via dim) and control cube , I saw the following screenshot .

Am I doing something wrong here ? My aim was to lock all the elements of actvsbud dim via rule statement .
Attachments
Screenshot of element security cube and element security assignment
Screenshot of element security cube and element security assignment
element_security.jpg (79 KiB) Viewed 4433 times
anoops81
Posts: 101
Joined: Tue May 12, 2009 8:20 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: Office 2010

Re: Loading Data from Database by checking contributor statu

Post by anoops81 »

Hi All ,

I was able to achieve this (Loading Data from Database by checking Status of the node) by creating a flag measure . This flag allows the user to select "YES" from the picklist through contributor (There is no "No" option and no going back once "YES" is selected . IF "YES" is selected by user, the data refresh (TI process) for the cell will be skipped , Else the data will be overwritten from the DB .Locking of the node happens via Contributor (by default) .

Regards
Anoop
Post Reply