×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Daily cube refresh

Daily cube refresh

Daily cube refresh

(OP)
Hi,

I have a power cube built using cognos Transformer. We need to refresh this cube daily. I tried this using scheduler and its not working.

Can anybody tell me how a cube can be refreshed daily.

Cheers,

RE: Daily cube refresh

vinayaca,

We update cubes using scheduled mdl scripts within cognos scheduler.An example of the script is below:

OPENpy "N:\Cognos Development\Powerplay Cubes\cube1.pyh"
Createfiles
savepy "N:\Cognos Development\Powerplay Cubes\cube1.pyh"

Hope this helps,

Adam.

RE: Daily cube refresh

(OP)
Hi Adam,

Could you please tell me how this MDL script can be run in Scheduler. We have an MDL file from which the cube has to be created daily.

Can I use OpenMDL & Create Files staments instead of OpenPy ?

Thanx,
Vinay

RE: Daily cube refresh

Hello Team,

As part of our evaluation we want to know how the Role based security is implemented in COGNOS. Is that NT authentication or in the database authentication? Is there any document i can verify about how the roles are assigned?
Please advise.

Thanks,
Ravee

RE: Daily cube refresh

Vinay,

To run the mdl script within scheduler, simply select insert recurring task, within the identification tab where you would select a report to be scheduled, drop down the file type box and select all files, insert the mdl file (**the mdl script is just a text document written in notepad, and saved with a file extension of .mdl). The open py part of the mdl statement is a reference to the powerplay report, and is therefore required in the script. Schedule the file as you would a normal report.

Adam.

RE: Daily cube refresh

Here is the script that will build the cube daily

You can also add script to move the cubes to the correct destination folders for user access

Remenber, in the model you must fill in the user and password required to access the database (in the Signons window)

option explicit

Sub Main ()
   Dim objTransApp As Object
   Dim objModel As Object
   Dim strModelPath As String
   Dim strLocation As String
   Dim strModelSource As String
   Dim strMsgText As String


   '*** Set The Error Trapping  *****************************************************

   On Error GoTo Errhdlr1:    
   
   '*** File Names and Path(s) *****************************************************
   
   strLocation = "C:\Models\PY! Definitions\"                ' Set the path to the model
   strModelSource = "Sales Analysis.pyi"                ' Set the model name    
   strModelPath = strLocation & strModelSource
   
   '*** Open model inside Transformer **********************************************
   
   Set objTransApp = CreateObject("CognosTransformer.Application.cer1")
   Set objModel = objTransApp.OpenModel (strModelPath)
   
   '*** Clean model and build cubes ************************************************
   
   With objModel

      .CleanHouse 19981231
      .CreateMDCFiles
      .Close
   End With


Errhdlr1:         
      Select Case Err
         Case 75
            strMsgText="Path is invalid."
         Case 76
            strMsgText="Path not found."
         Case 70
            strMsgText="Permission denied."
         Case Else
            strMsgText="Error " & Err & ": " & Error$ & "occurred."
      End Select

      '*** Display a message about the error that was trapped ************************           
      MsgBox strMsgText
      
End Sub

RE: Daily cube refresh

Both macros and mdl scripts run in scheduler. We prefer to use mdl scripts due to the simplicity of using a simple paragraph of code in notepad.

Adam.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close