Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cubes

Status
Not open for further replies.

jyash

IS-IT--Management
Dec 11, 2003
12
US
Hi all,
Can anyone summarize the things i need to keep in mind before creating cubes. i m new to powerplay. i have read the documents and have the basic idea. any more tips which anyone gathered in practical implementation would be greatly appreciated. Also if u can tell somethinga about cube security

TIA
yash
 
Hi Jyash,

I use scripts to build all of my cubes. There area alot of things you should consider, off the top of my head you should be mindful of:

1. What data does this cube need and where is it coming from ?
2. Where/who is this cube going to ? How am I going to distribute it ?

I have a number of cubes built overnight on a Windows platform using Cognos Macro scripts. These are invoked by Windows Scheduler. I also have a number of cubes built on a Unix platform. It simply depends on where the data is coming from and when it is available and where the cubes have to go once they are made.

A sample Windows script may look something like:

''''''''''''''''''''''''
' Macro to produce Cubes from Transformer Models
'
' Source: Cognos Macro Example
' Updated: 12/02/03
'
Declare Sub Build_a_cube(strModel_Path)
Declare Sub Move_a_cube(strSourceFilename,strTragetFilename)

Sub Main ()
Call Check_Drive("O:","\\Melvs02\Data2\Corp\Vwa")

Build_a_cube("N:\InfoServices\DWG\Cogapps\cubegen\Data Warehouse\Fieldlink\Transformer Models\fieldlink model.pyi")
Call Move_a_cube("c:\Temp\build\notices current.mdc","O:\Cognos\FieldLink\Cubes\notices current.mdc")
Call Move_a_cube("c:\Temp\build\fieldlink current.mdc","O:\Cognos\FieldLink\Cubes\fieldlink current.mdc")

Build_a_cube("N:\InfoServices\DWG\Cogapps\cubegen\Data Warehouse\Fieldlink\Transformer Models\activity model new.pyi")
Call Move_a_cube("c:\Temp\build\activity current.mdc","O:\Cognos\FieldLink\Cubes\Final Cubes\activity current.mdc")
End Sub


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Sub Build_a_cube(strModelPath)

Dim objTransApp As Object
Dim objModel As Object

On Error Goto ErrorHandler

Set objTransApp = CreateObject("CognosTransformer.Application.Cer3")
Set objModel = objTransApp.OpenModel(strModelPath)

With objModel
.CreateMDCFiles
.Update
.Close
End With
Goto ExitSub

objModel.Close
objTransApp.Close

Set objModel = Nothing
Set objTransApp = Nothing

ErrorHandler:
MsgBox "Error " & Err & ": " & Error$, 16, MacroName
Resume ExitSub
ExitSub:
End Sub


''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Sub Move_a_cube(strSourceFilename,strTargetFilename)

On Error Goto ErrorHandler

If Dir$(strSourceFilename) <> &quot;&quot; Then
If Dir$(strTargetFilename) <> &quot;&quot; Then
Kill strTargetFilename
End If

FileCopy strSourceFilename,strTargetFilename
Kill strSourceFilename
DoEvents
End If
Goto ExitSub

ErrorHandler:
MsgBox &quot;Error &quot; & Err & &quot;: &quot; & Error$, 16, MacroName
Resume ExitSub
ExitSub:
End Sub

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top