Problem creating dimension hierarchy with TM1 REST Api

Post Reply
Alexander Jell
Posts: 7
Joined: Thu Jul 16, 2015 2:28 pm
OLAP Product: TM 1
Version: 10.2.2
Excel Version: 2010

Problem creating dimension hierarchy with TM1 REST Api

Post by Alexander Jell »

Hi,

I'm trying to import data from a MSSQL database into our TM1 database using a C# console application. The whole project already works pretty fine.
The struggle: Insert an element under a consolidation. The elements are under the root and under the consolidation resulting in strange behavior within rules and feeders. Can anyone help me solving this problem? I use the following code to insert the elements into the dimension:

Code: Select all


[POST] /api/v1/Dimensions('Version_TS')/Hierarchies('Version_TS')/Elements('Szenarien')/tm1.SetComponent

Post Body:
{
   "Element":{
        "Name":"testelement",
        "UniqueName":"[Szenarien].[testelement]"
    }
}

Result:
Dimension.PNG
Dimension.PNG (8.12 KiB) Viewed 3535 times
(The other elements within the dimension are added the same way)

Does anyone have an idea what im doing wrong? (Or idea how i can remove the root -> Element relation)

I'm thankful for every tipp or suggestion
Last edited by Alexander Jell on Mon Oct 12, 2015 2:42 pm, edited 2 times in total.
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Problem creating dimension hierarchy with TM1 REST Api

Post by David Usherwood »

It's probably fine. Open the dimension in the subset editor and click Hierarchy Sort (on the right of the Z-A button). The default layout is often a bit random when loading from external data.
Much as I applaud more use of the REST API, you'd probably get the result quicker using SQL and ODBC.
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: Problem creating dimension hierarchy with TM1 REST Api

Post by tomok »

What issue with rules and feeders? All I see is a screen shot with what I assume is the default subset view. What are your settings in the SORTCOMPONENTSTYPE and SORTELEMENTSSENSE in the }DimensionProperties cube? When you add elements to a dimension programatically these settings control how the dimension is ordered. If these are blank the order is going to be quite random. The important thing is that the children are under the correct parents, which is true in your case. So, what exactly is the problem.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Alexander Jell
Posts: 7
Joined: Thu Jul 16, 2015 2:28 pm
OLAP Product: TM 1
Version: 10.2.2
Excel Version: 2010

Re: Problem creating dimension hierarchy with TM1 REST Api

Post by Alexander Jell »

Thanks for the answer. The settings in SORTCOMPONENTSTYPE and SORTCOMPONENTSTYPE solved it!
Post Reply