10 Steps to Automate Cognos Transformer Cubes

​Automate Cognos Transformer Cubes in 10 easy steps!

It can be frustrating to open a cube and realize that it is not updated with the current information you need to perform analysis or report off of. You then remember that the person who is responsible for updating cubes is not in the office and the update did not occur. Follow these 10 simple steps to automate Cognos Transformer cubes.

Automate Cognos Transformer Cubes

Step 1 – Determine the type of Transformer model you have (either a *.pyi or *.mdl). The code is slightly different depending on the model type.

Step 2 – Identify the best time to run your cube build. You don’t want to process against production or during your data warehouse update. I have typically scheduled the builds between 3 a.m. and 5 a.m., depending on the length of time the cube build process takes.

Step 3 – Ensure that you have a sign on attached to your transformer model. To check this, or add open Transformer, click on view and then click on “signons”. If the box is blank, right click on “create your sign on”. This should match the login information you used to access the server.

Step 4 – Open Notepad and begin to write the code that will open Transformer, build the cube, save it and close Transformer. The start of the code is as follows:

cd "C:Program Files (x86)ibmcognosc10bin" (this is for an install on the C drive of the server. Check the path of your install to get to the bin folder)

Step 5 – 2nd line of the string (must be on the next line).The first part is calling the executable to open Transformer. The last part of the string, starting at C: is the location of the saved model.

cogtr.exe -n2 -m"C:Folder PathModel Name.mdl"

Step 6 – Determine command line options (in yellow above). To open the model in batch mode, select –n2 and the -m specifies the .mdl format model. Use –p for a .pyi model. There are many other options for use, depending on your environment, that can be found at: http://publib.boulder.ibm.com/infocenter/c8bi/v8r4m0/index.jsp?topic=/com.ibm.swg.im.cognos.ug_cogtr.8.4.0.doc/ug_cogtr_id13076p_option.html

Step 7 – The completed string for a .mdl file would read as follows:

cd "C:Program Files (x86)ibmcognosc10bin"

cogtr.exe -n2 -m"C:Folder Path model name.mdl"

Save it as CognosTransformerbuild.bat or a name that makes sense to you.

Step 8 – Test your script by double clicking the .bat file that you just created. A command prompt window should open and the transformer build will kick off. After the correct amount of time for your cube to build, check to make sure that everything ran okay. You can do this by checking the cube itself or looking at the log file for your build.

Step 9 – Schedule your cube build by using Windows scheduler or any other scheduler that is used in your environment. In Windows, the scheduler is found in accessories -> system tools.

Step 10 – Schedule your log files to be emailed to you daily to ensure the cube was built properly. You can also check the length of time it takes your cubes to build in this file. Watch the time to make sure it isn’t bumping into production or other process. Adjust the start time of the build if necessary.

Enjoy your new-found automation and if you need more information on how to automate Cognos Transformer cubes, email us at Sales@LodestarSolutions.com.

Hope you liked this blog to help Automate Cognos Transformer Cubes, check out this blog on creating a prior year calculation using a DMR by clicking here.

X