Is it possible to change an element type from C to N via TI other than by this method which seems quite cumbersome. (Of course it is easy in the Dimension Editor so you would expect something similar to be available in TI).
Record all Parentage of Element to temporary dimension.
Record all Attributes of Element to temporary dimension.
Record Index
Find Element_At_Index_plus_1
Delete Element
Readd Element with Type=N and use DimensionElementInsert InsertionPoint parameter to ensure it is prior to Element_At_Index_plus_1
Restore all Parentage
Restore all Attributes
Hope I am missing something here because it does seem to be using a sledge hammer to crack a nut.
TIA.
Regards
John
TI Change type of Level 0 element from C to N
-
- Community Contributor
- Posts: 300
- Joined: Mon Mar 23, 2009 10:50 am
- OLAP Product: PAW/PAX 2.0.72 Perspectives
- Version: TM1 Server 11.8.003
- Excel Version: 365 and 2016
- Location: South London
-
- 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: TI Change type of Level 0 element from C to N
Removing all the children underneath a parent element will convert it to an "N" element. Use a While..End loop to cycle through a "C" element and use the DimensionElementComponentDelete to remove each child.
-
- MVP
- Posts: 3706
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: TI Change type of Level 0 element from C to N
@John - if you also want to transfer data you will need to export that too. It is a bit of a sledgehammer but TM1 simply isn't set up for element renaming and N -> C or C -> N conversion. Of course if you're not concerned about the names exactly matching then you can do away with the temp dim (or text file) and just read straight in.
@Tomok - as far as I'm aware adding a child to an N will convert the N to a C. However deleting all children from a C will leave you with an orphan consolidation. The element will technically be level 0 but it will still have a DTYPE of C.
@Tomok - as far as I'm aware adding a child to an N will convert the N to a C. However deleting all children from a C will leave you with an orphan consolidation. The element will technically be level 0 but it will still have a DTYPE of C.
-
- Site Admin
- Posts: 6667
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: TI Change type of Level 0 element from C to N
You're correct on the second point; removing the children doesn't work. More irritatingly if you have a subset which shows the consolidation with its original children, the (now non-existent) hierarchy will still appear. (Though when you select the consolidation element itself it will show that it has no children.) Also you still can't write to the element because it's a consolidation.lotsaram wrote:@John - if you also want to transfer data you will need to export that too. It is a bit of a sledgehammer but TM1 simply isn't set up for element renaming and N -> C or C -> N conversion. Of course if you're not concerned about the names exactly matching then you can do away with the temp dim (or text file) and just read straight in.
@Tomok - as far as I'm aware adding a child to an N will convert the N to a C. However deleting all children from a C will leave you with an orphan consolidation. The element will technically be level 0 but it will still have a DTYPE of C.
On the first point, I have to admit that I can't blame Applix for this one. Chances are that it wouldn't have even occurred to them that someone with a well designed metadata structure would need to do that conversion.
N to C does indeed happen automatically if you simply add children. The other way, you do have to destroy and recreate the element. However it's not necessary to temporarily store the attributes. If the change is done in the metadata tab of the process then it's done on a copy of the dimension which is only registered after the metadata tab ends. Consequently as long as both the destruction and recreation is done in the same tab, when the element comes out the other end the attributes cube thinks it's the same one and that the relevant metadata still applies.
Any calculated data on the other hand... as you correctly indicate that would have to be exported and reimported because it was never stored anywhere.
(Edit: Same goes for storing the parents and reassigning it to them. A temporary dimension is as good a solution as any for that. Again this comes back to why this should even be necessary...)
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Community Contributor
- Posts: 300
- Joined: Mon Mar 23, 2009 10:50 am
- OLAP Product: PAW/PAX 2.0.72 Perspectives
- Version: TM1 Server 11.8.003
- Excel Version: 365 and 2016
- Location: South London
Re: TI Change type of Level 0 element from C to N
Sorry omitted to say thanks on this one to Tomok, Lotsa and Alan due to pressure of work and now I have a moment...Thanks
Its useful to know the attributes dont get deleted until you save a dimension which is kind of obvious since the attributes are stored in a cube which are only updated once you save the dimensionl.
In a spot of inspiration I tried to see whether reissuing a insertdimensionelement with a different type would work. it does not complain but does not do the change.
However you can use this method of reissuing the command with insertdimensioncomponent to change the weighting which is useful.
Its useful to know the attributes dont get deleted until you save a dimension which is kind of obvious since the attributes are stored in a cube which are only updated once you save the dimensionl.
In a spot of inspiration I tried to see whether reissuing a insertdimensionelement with a different type would work. it does not complain but does not do the change.
However you can use this method of reissuing the command with insertdimensioncomponent to change the weighting which is useful.