COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Transformer => Topic started by: qvixote on 09 May 2014 09:27:19 AM

Title: Right way to update cube data
Post by: qvixote on 09 May 2014 09:27:19 AM
Hi!

This may be a newbie question. I have some transformer cubes and use them as sources on many reports in Report Studio. I learned to create cubes and then publish them as packages. Any time I need to refresh the cube data, I repeat these two steps: "Create Selected PowerCube" and "Publish PowerCube as Data Source and Package" as I was told when they teach me. The problem with this way of updating cube data is that every report wich uses the updated report need to be opened with Report Studio to check the updated source before yo can execute it.

I'm sure there must be a way in wich I update only the data in the cube and reports using the cube dont need to check it.

Anyone can help me with that?
Title: Re: Right way to update cube data
Post by: sdf on 12 May 2014 03:14:57 AM
Updating the cube is actually running your model (from framework) to your transformer (building cubes).
You can automate this cube building via batch file running in your task scheduler (windows) or shell file running in cron (unix/linux).



Feds
Title: Re: Right way to update cube data
Post by: qvixote on 12 May 2014 04:35:44 PM
Thanks!

I'll read the manual to learn about the command line options and then make a batch file.
Title: Re: Right way to update cube data
Post by: sdf on 12 May 2014 10:15:10 PM

Here is a sample for your reference.

@Echo 1. Creating Sale Cube
@Echo Off
"C:\Program Files (x86)\ibm\cognos\c10\bin\cogtr.exe" -nologo -n2 -r4 -dLogFileDirectory="D:\Cube Automation\Logs" -dMultiFileCubeThreshold=7500000 -dEnablePCOptimizer=1 -dDataSourceDirectory="D:\Cube Automation\Model" -dCubeSaveDirectory="D:\CUBE" -dDataWorkDirectory="D:\Cube Automation\DEV" -dModelWorkDirectory="D:\Cube Automation\DEV" -dModelSaveDirectory="D:\Cube Automation\Model" "D:\Cube Automation\Model\Sales.pyj"
@Echo ..................




Feds
Title: Re: Right way to update cube data
Post by: cognostechie on 14 May 2014 08:06:36 PM
Every time you refresh the data in the cube, the package does not need to be published again. Though updating
using a batch file is the ideal way but even if you are opening Transformer and building the cube manually, you still
do not need to publish the package. It's only when some changes are made to the structure of the cube that you will
need to re-publish the package and even in that case, the Data Source does not need to be created again.
Title: Re: Right way to update cube data
Post by: Michael75 on 15 May 2014 03:28:37 AM
@ cognostechie

QuoteIt's only when some changes are made to the structure of the cube that you will need to re-publish the package and even in that case, the Data Source does not need to be created again.

Is there a way to only publish the package without recreating the data source? I'm only aware of the option Publish PowerCube as Data Source and Package, available by right-clicking on the cube.

Thx, Michael
Title: Re: Right way to update cube data
Post by: CognosPaul on 15 May 2014 06:27:06 AM
The metadata of the cube is pulled every time a new session connects to it. You shouldn't need to republish the package simply because you've made a change to the structure. At worst, close all instances of IE and reopen in Report Studio. If you still don't see the changes, then there are other issues at play.

There are occasionally reasons why you may want to republish a cube package. Occasionally I create workarounds to various MDX limitations with parameter maps and custom session parameters. Any changes to those would necessitate a package republish.

Michael, while you shouldn't need to do republish in this case, you can open Framework, import the cube from the existing data source, and publish as a package there.
Title: Re: Right way to update cube data
Post by: cognostechie on 17 May 2014 02:29:06 PM
Those are exactly the reasons why I consider it safe to re-publish the package when the structure of the cube is changed, otherwise we need to spend time on figuring out why changes are not visible in the package and then go back and publish it because every change is not automatically updated in the package.