Monthly Poll 201604_201605 - What do you use as a code library? Or do you?

Post Reply

TI Code - How Do You Handle It?

We have standard code that we copy and paste directly into new processes as needed.
24
38%
We use an in house library of standard functions which can be called by new processes.
19
30%
We use Bedrock.
10
16%
We use a library supplied by another third party. (Details in post.)
1
2%
We don't; we ALWAYS just create code as needed from scratch.
9
14%
 
Total votes: 63

Alan Kirk
Site Admin
Posts: 6647
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:

Monthly Poll 201604_201605 - What do you use as a code library? Or do you?

Post by Alan Kirk »

It's been a while since we've had one of these so it might be interesting to look at another common aspect of TM1 usage.

It is of course possible to create TI code from scratch for each new task, but it's often the case that doing so would involve reinventing the wheel. It would be interesting to see how people overcome this.

You can select up to 4 options since multiple methods may be used; the last one is of course incompatible with the other four. (Obviously some unique code needs to be created for each new task, but this is about whether you maintain standard code to do generic tasks.) Votes can be changed if necessary.
User avatar
paulsimon
MVP
Posts: 808
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Monthly Poll 201604_201605 - What do you use as a code library? Or do you?

Post by paulsimon »

Hi

I provide a library of routines to my various clients. The version of Bedrock that I am familiar with only covers TI processes. However, I supply a set of processes that work with standard cubes, rules, dos batch, chores, etc to cover most of the standard requirements, such as dimension maintenance, cube transfers, security, automated code promotion, etc.

Regards

Paul Simon
pandinus
Posts: 78
Joined: Tue Mar 18, 2014 8:02 am
OLAP Product: TM1, Cognos Express
Version: 10.2.2
Excel Version: 2013

Re: Monthly Poll 201604_201605 - What do you use as a code library? Or do you?

Post by pandinus »

We use a mix of standard pieces of code that we use as a base for any new model and building code on the go.

While reinventing the wheel might not be the best idea, sometimes it is better to build the wheel that you need in a specific situation instead of using a full and overblown generic wheel as provided by a library such as Bedrock.

Maintainability and transparency of any piece of code is key. This is where many libraries (or generic processes in general) don't provide.
User avatar
jim wood
Site Admin
Posts: 3958
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: Monthly Poll 201604_201605 - What do you use as a code library? Or do you?

Post by jim wood »

We have a set of standard processes that we use, but they also act as a code library for processes that come outside of their range,

Jim.
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
Wim Gielis
MVP
Posts: 3232
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Monthly Poll 201604_201605 - What do you use as a code library? Or do you?

Post by Wim Gielis »

This is it for myself.

I have my own set of standard processes that I use, including:
- a process to copy a dimension entirely, including attributes, under a new name.
- a process to delete TM1 objects (cubes, views, subsets, dims, ... ) that have a certain name prefix and/or suffix
- a process to create 3 public subsets automatically, for 1 dimension or all dimensions of a cube or all application dimensions,... It creates a default subset using certain rules, a level 0 subset and a subset containing the "Total of a dimension and all level 0 descendants below" (useful for reconciliating data). Aliases are applied automatically, the language for the subset names can be set ("Default" is not "default" in every language in TM1). The subsets can be dynamic or static. If dynamic a comment text can be added to the MDX definition if wanted.
- a process that creates a cube which shows all views (public and private), all subsets (public and private), all users. It indicates which vues use a certain subset.
- a process to unwind a dimension or unwind 1 hierarchy, as everybody will I guess
- a process to search for double countings: a TI can list all elements in 1 dimension or all dimensions that have multiple parents in a text file. Columns include the number of parents and also all individual parent names. While having multiple parents is not a guarantee for double countings, this process is very useful. Opening the generated CSV file in Excel, a few autofilter actions later I spot the double counting culprit(s)
- a process (also mentioned in StartupChores) that sets cube dependencies by inspecting the *.rux files for DB() functions in rules and feeders
- a process (also mentioned in StartupChores) that turns on Cube logging
- ...

Most of the processes have a "standard" variant and and "extended" variant, in which I go completely the generic way, including many parameters and for much more possibilties.

Once set up, these processes gain a lot of time for a full-time TM1 consultant or TM1 admin. I can recommend anyone to (attempt to) write such generic processes.

When it comes to creating new TI processes for dimensions, I usually start from existing TI processes or I start from scratch.

TI processes related to data integration or copying data and everything that has to do with temporary subsets/views in TI, can be "generated" using an Excel VBA application. A userform provides choices and then VBA generates the (almost) exact coding. After a few minutes about 90 % of the process code is ready. ViewCreate, CellIncrementN, CubeSetLogChanges, a standard AsciiOutput, sanity checks on the supplied parameters, ... The last step (work in progress for now) is using the API within VBA to generate the TI process to avoid that last bit of manual work.

That said, I do not use Bedrock in projects, only ad hoc when I know that it can save me time not reinventing the wheel. My main objective is that it's too generic and except for the very simple processes, any TI process needs some sort of customization. If we don't want to hack in the generic Bedrock processes then that layer of customizations is more difficult than starting from scratch/with existing processes.

I use Notepad++ with the TM1 language addon for TM1 TI processes and rules - I extended it to help me in my day-to-day TM1 work.

Best regards,

Wim
Best regards,

Wim Gielis

IBM Champion 2024-2025
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
dcolecpa
Posts: 2
Joined: Sat Aug 29, 2009 12:42 am
OLAP Product: TM1
Version: 9.4
Excel Version: 2003

Re: Monthly Poll 201604_201605 - What do you use as a code library? Or do you?

Post by dcolecpa »

I use a combination of Code snippets in text files and Textpad 'libraries'. I think Notepad++ could be used the same way. Either way the are both convenient and portable.

Don
User avatar
MarkTM1
Posts: 4
Joined: Wed Mar 25, 2009 2:56 am
OLAP Product: TM1
Version: 10.2
Excel Version: Excel 2010

Re: Monthly Poll 201604_201605 - What do you use as a code library? Or do you?

Post by MarkTM1 »

Use Notepad++ with code Snippets and saved script files. Copy and paste into TI to compile.
Post Reply