Hi Team,
We update dimensions with datasource option... ODBC link which connects to DB.
Issue: Every time i update my dimension the default subset gets deleted which is creating problem to open the report in Cognos BI.(Query studio reports).
Process Sequence :
Dimension Name : Account.
Process 1 : Deletes parent child relationship.
Process 2 : Update Hierarchy 1
Process 3 : Update Hierarchy 2
Process 4 : All leaf level elements.
Let me know the fix for the same.
Default view getting deleted post update of the dimension
-
- Posts: 15
- Joined: Fri Jul 23, 2010 9:49 am
- OLAP Product: TM1 10.2.2 Cognos Planning10
- Version: TM1 10.2.2 Cognos Planning10
- Excel Version: 2010
- ioscat
- Regular Participant
- Posts: 209
- Joined: Tue Jul 10, 2012 8:26 am
- OLAP Product: Contributor
- Version: 9.5.2 10.1.1 10.2
- Excel Version: 07+10+13
- Contact:
Re: Default view getting deleted post update of the dimensio
why not to build new hierarchy in next process? maybe it is possible to build default subset in the same process (prolog tab), but i'm not sure
-
- MVP
- Posts: 3704
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: Default view getting deleted post update of the dimensio
I think you must be doing more than "delete parent child relationship". If you are unwinding a dimension then static subsets will be preserved. On the other hand if you are deleting then recreating elements over multiple processes then loss of static subset members is expected. Check your code in process 1, if it contains DimensionDeleteAllElements or DimensionElementDelete then this is your reason. To preserve the static subsets including default then change process 1 to pure unwind (look at Bedrock code) then you could add a process 5 to tidy up if necessary by removing any orphan C elements and moving any orphan N elements to an "undefined parent" bucket.devathadeepak wrote:Hi Team,
We update dimensions with datasource option... ODBC link which connects to DB.
Issue: Every time i update my dimension the default subset gets deleted which is creating problem to open the report in Cognos BI.(Query studio reports).
Process Sequence :
Dimension Name : Account.
Process 1 : Deletes parent child relationship.
Process 2 : Update Hierarchy 1
Process 3 : Update Hierarchy 2
Process 4 : All leaf level elements.
Let me know the fix for the same.
-
- Posts: 15
- Joined: Fri Jul 23, 2010 9:49 am
- OLAP Product: TM1 10.2.2 Cognos Planning10
- Version: TM1 10.2.2 Cognos Planning10
- Excel Version: 2010
Re: Default view getting deleted post update of the dimensio
You are right ... i have the first process to delete the consolidated elements as below.
sDim='Account';
vDim_Cnt = DIMSIZ (sDim);
WHILE (vDim_Cnt >=1 );
Element = DIMNM ( sDim, vDim_Cnt);
IF ( DTYPE ( sDim,Element) @<> 'N');
DimensionElementDelete(sDim, Element);
vDim_Cnt = vDim_Cnt -1;
ELSE;
vDim_Cnt = vDim_Cnt -1;
ENDIF;
END;
Currently the dimension is getting created with no elements in default subset.......is their any way to safegurd the default subset after dimension is updated.
sDim='Account';
vDim_Cnt = DIMSIZ (sDim);
WHILE (vDim_Cnt >=1 );
Element = DIMNM ( sDim, vDim_Cnt);
IF ( DTYPE ( sDim,Element) @<> 'N');
DimensionElementDelete(sDim, Element);
vDim_Cnt = vDim_Cnt -1;
ELSE;
vDim_Cnt = vDim_Cnt -1;
ENDIF;
END;
Currently the dimension is getting created with no elements in default subset.......is their any way to safegurd the default subset after dimension is updated.
-
- Posts: 15
- Joined: Fri Jul 23, 2010 9:49 am
- OLAP Product: TM1 10.2.2 Cognos Planning10
- Version: TM1 10.2.2 Cognos Planning10
- Excel Version: 2010
Re: Default view getting deleted post update of the dimensio
We have same code in bedrock too..
### Go through dimension and delete all C elements ###
nElementCount = DimSiz( pDimension );
nElementIndex = 1;
While( nElementIndex <= nElementCount );
sElement = DimNm( pDimension, nElementIndex );
sElType = DType( pDimension, sElement );
If( sElType @= 'C' );
If( pDebug >= 1 );
AsciiOutput( sDebugFile, 'Element: ' | sElement | ' will be deleted' );
EndIf;
If( pDebug <= 1 );
DimensionElementDelete( pDimension, sElement );
nElementCount = nElementCount - 1;
nElementIndex = nElementIndex - 1;
EndIf;
EndIf;
nElementIndex = nElementIndex + 1;
End;
### Go through dimension and delete all C elements ###
nElementCount = DimSiz( pDimension );
nElementIndex = 1;
While( nElementIndex <= nElementCount );
sElement = DimNm( pDimension, nElementIndex );
sElType = DType( pDimension, sElement );
If( sElType @= 'C' );
If( pDebug >= 1 );
AsciiOutput( sDebugFile, 'Element: ' | sElement | ' will be deleted' );
EndIf;
If( pDebug <= 1 );
DimensionElementDelete( pDimension, sElement );
nElementCount = nElementCount - 1;
nElementIndex = nElementIndex - 1;
EndIf;
EndIf;
nElementIndex = nElementIndex + 1;
End;
-
- MVP
- Posts: 3704
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: Default view getting deleted post update of the dimensio
Not to labour the point but you seem a bit slow on the uptake. Yes there is a way to prevent loss of subset members don't delete the members from the dimension to start with! Maybe you misunderstand what is meant by "UNWIND" which is to break all parent/child relationships (that is change the definition of the consolidated members) but without deleting any members.devathadeepak wrote:Currently the dimension is getting created with no elements in default subset.......is their any way to safegurd the default subset after dimension is updated.
Your bedrock code would seem to be from Bedrock.Dim.AllConsols.Delete. It is much faster to simply delete all consols and rebuild as unwinding requires recoursing through all children of each consolidation at all levels. Sometimes from a processing time perspective it is better to rebuild dimensions like this (and then rebuild all static subsets also). But I think what you need in this case is Bedrock.Dim.Unwind then (at the risk of repeating myself again) you won't have the problem you describe.
-
- Posts: 15
- Joined: Fri Jul 23, 2010 9:49 am
- OLAP Product: TM1 10.2.2 Cognos Planning10
- Version: TM1 10.2.2 Cognos Planning10
- Excel Version: 2010
Re: Default view getting deleted post update of the dimensio
Sorry for the confusion..
Process 1 : Delete the consolidated elements
Process 2 : Update Hierarchy 1
Process 3 : Update Hierarchy 2
Process 4 : All leaf level elements.
In process 1 we are deleting all the consolidated elements , as you have explained we are not breaking the parent child relationship.
Process 1 :
sDim='Account';
vDim_Cnt = DIMSIZ (sDim);
WHILE (vDim_Cnt >=1 );
Element = DIMNM ( sDim, vDim_Cnt);
IF ( DTYPE ( sDim,Element) @<> 'N');
DimensionElementDelete(sDim, Element);
vDim_Cnt = vDim_Cnt -1;
ELSE;
vDim_Cnt = vDim_Cnt -1;
ENDIF;
END;
Other processes are just update the hierarchy.
I have tried with both options in Process 1- unwind the hierarchy and delete the consolidated elements. However the Default subset is blank.
Process 1 : Delete the consolidated elements
Process 2 : Update Hierarchy 1
Process 3 : Update Hierarchy 2
Process 4 : All leaf level elements.
In process 1 we are deleting all the consolidated elements , as you have explained we are not breaking the parent child relationship.
Process 1 :
sDim='Account';
vDim_Cnt = DIMSIZ (sDim);
WHILE (vDim_Cnt >=1 );
Element = DIMNM ( sDim, vDim_Cnt);
IF ( DTYPE ( sDim,Element) @<> 'N');
DimensionElementDelete(sDim, Element);
vDim_Cnt = vDim_Cnt -1;
ELSE;
vDim_Cnt = vDim_Cnt -1;
ENDIF;
END;
Other processes are just update the hierarchy.
I have tried with both options in Process 1- unwind the hierarchy and delete the consolidated elements. However the Default subset is blank.