Hello, I came across this function DimensionElementInsertDirect in the pre-recorded training video (I did send the question to the trainer but I couldn’t wait for 24 hours)...
He put this function in Prolog where he basically said the reason why he used this one instead of the regular DimensionElement Insert in Metadata is because there were only two elements in the measure dimension and this saves compiling time.
my question is why he placed it in Prolog instead of Metadata? I read somewhere that the direct functions can be placed in any tab, is it true?
Thanks!
Question about DimensionElementInsertDirect
-
- Posts: 83
- Joined: Wed Feb 28, 2018 2:20 pm
- OLAP Product: TM1
- Version: 10.2.2
- Excel Version: 2016
-
- MVP
- Posts: 3105
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.0.9.18
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Question about DimensionElementInsertDirect
You can place them in any tab. But of course, if in Metadata / Data tab, then it must be part of the data source. In the other 2 tabs you’re not processing a data source so it can/should be without data source.
The fact that the dimension only has 2 elements is ridiculous as explanation for the Direct function. Usually you tend to use the Direct variants if the dimension has tens of thousands of elements or more and you only need to update the dimension with a very small number of changes.
The fact that the dimension only has 2 elements is ridiculous as explanation for the Direct function. Usually you tend to use the Direct variants if the dimension has tens of thousands of elements or more and you only need to update the dimension with a very small number of changes.
Best regards,
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
-
- Posts: 83
- Joined: Wed Feb 28, 2018 2:20 pm
- OLAP Product: TM1
- Version: 10.2.2
- Excel Version: 2016
Re: Question about DimensionElementInsertDirect
Thanks Wim! That’s exactly why I got so confused! I read the IBM documentation, which states the same as you just explained! I’ll see what he replies on this one...
- gtonkin
- MVP
- Posts: 1192
- Joined: Thu May 06, 2010 3:03 pm
- OLAP Product: TM1
- Version: Latest and greatest
- Excel Version: Office 365 64-bit
- Location: JHB, South Africa
- Contact:
Re: Question about DimensionElementInsertDirect
It would not make much sense using DimensionElementInsertDirect in Metadata as DimensionElementInsert would do the same thing.
I did however do this inadvertently because I copied code from Data to Metadata and it crashed my server (10.2.2 FP4)
I have also found severe performance degradation using DimensionElementInsertDirect in Data when dealing with large dimensions and went back to a combination of Metadata and Data.
I did however do this inadvertently because I copied code from Data to Metadata and it crashed my server (10.2.2 FP4)
I have also found severe performance degradation using DimensionElementInsertDirect in Data when dealing with large dimensions and went back to a combination of Metadata and Data.
- jim wood
- Site Admin
- Posts: 3951
- Joined: Wed May 14, 2008 1:51 pm
- OLAP Product: TM1
- Version: PA 2.0.7
- Excel Version: Office 365
- Location: 37 East 18th Street New York
- Contact:
Re: Question about DimensionElementInsertDirect
Correct me if I'm wrong but, this is also to do with commitment? Normal waits until the tab is changed but direct writes it straight to the dimension, the second being more beneficial it certain circumstances.gtonkin wrote: ↑Thu Oct 31, 2019 1:42 pm It would not make much sense using DimensionElementInsertDirect in Metadata as DimensionElementInsert would do the same thing.
I did however do this inadvertently because I copied code from Data to Metadata and it crashed my server (10.2.2 FP4)
I have also found severe performance degradation using DimensionElementInsertDirect in Data when dealing with large dimensions and went back to a combination of Metadata and Data.
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
- gtonkin
- MVP
- Posts: 1192
- Joined: Thu May 06, 2010 3:03 pm
- OLAP Product: TM1
- Version: Latest and greatest
- Excel Version: Office 365 64-bit
- Location: JHB, South Africa
- Contact:
Re: Question about DimensionElementInsertDirect
This link gives a bit more clarity on the workings.
-
- Posts: 83
- Joined: Wed Feb 28, 2018 2:20 pm
- OLAP Product: TM1
- Version: 10.2.2
- Excel Version: 2016
Re: Question about DimensionElementInsertDirect
Thanks for the info, I don't think I'll use the direct method much at all knowing that I might crush the server!! my online trainer never got back to me on this question...I assume that he knew he didn't explain it correctly in the video haha!!
-
- MVP
- Posts: 3105
- Joined: Mon Dec 29, 2008 6:26 pm
- OLAP Product: TM1, Jedox
- Version: PAL 2.0.9.18
- Excel Version: Microsoft 365
- Location: Brussels, Belgium
- Contact:
Re: Question about DimensionElementInsertDirect
I also notice that using DimensionElementInsertDirect in the Prolog tab might mean that you need to run the process twice as the first time the new elements are not inserted.
Still I tend to use the function without any hesitation in the Data tab, I have never crashed the TM1 server with it. What hasn’t been discussed as an advantage of the Direct functions is that you don’t need to have many If’s and other logic twice, in Metadata and Data tab. In the end, good models are also focusing on maintenance of the model, and that is important too.
Still I tend to use the function without any hesitation in the Data tab, I have never crashed the TM1 server with it. What hasn’t been discussed as an advantage of the Direct functions is that you don’t need to have many If’s and other logic twice, in Metadata and Data tab. In the end, good models are also focusing on maintenance of the model, and that is important too.
Best regards,
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Wim Gielis
IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly