automating the cube build/publish process using cognosscript brian morris, cbip bi-340 – cutting...

21
Automating the Cube Build/Publish Process Using CognosScript Brian Morris, CBIP BI-340 – Cutting Costs in Half by Automating the Cube Build Process Cognos Forum 2004 (June 27-30, Orlando, Florida)

Upload: angel-charles

Post on 14-Dec-2015

228 views

Category:

Documents


1 download

TRANSCRIPT

Automating the Cube Build/Publish ProcessUsing CognosScript

Automating the Cube Build/Publish ProcessUsing CognosScript

Brian Morris,Brian Morris, CBIP

BI-340 – Cutting Costs in Half by Automating the Cube Build Process Cognos Forum 2004 (June 27-30, Orlando, Florida)

Brian MorrisBrian Morris

• Data Warehousing Advisor

• Kerr-McGee Shared Services, LLC.

• Over 1,100 Cognos users & growing

• Building & Publishing 60+ Cubes Daily

• Cognos Products in Production: PPES, IWR, CQ, Viz, NoticeCast, CMM, Web Services, Planning, Consolidation. ReportNet in Dev

• Data Warehousing Advisor

• Kerr-McGee Shared Services, LLC.

• Over 1,100 Cognos users & growing

• Building & Publishing 60+ Cubes Daily

• Cognos Products in Production: PPES, IWR, CQ, Viz, NoticeCast, CMM, Web Services, Planning, Consolidation. ReportNet in Dev

RequirementsRequirements

Automated Cube Build / Publish

• 24/7 BI Production Environment

• Build & Publish Cubes based on:• Scheduled Date & Time• Flag Files • SQL Criteria

• Email Notification of:• Success• Called-Off• Failure

Automated Cube Build / Publish

• 24/7 BI Production Environment

• Build & Publish Cubes based on:• Scheduled Date & Time• Flag Files • SQL Criteria

• Email Notification of:• Success• Called-Off• Failure

SolutionSolution

Automated Cube Build / Publish

• CognosScript

Bundled with Cognos Transformer

Procedural Based

Completely Customizable

Examples available in Knowledge Base

Can be ran Unattended in MS Scheduler

Automated Cube Build / Publish

• CognosScript

Bundled with Cognos Transformer

Procedural Based

Completely Customizable

Examples available in Knowledge Base

Can be ran Unattended in MS Scheduler

Files and StructureFiles and Structure

• Master Script, 12 Steps – ~ 2700 lines

• LogToDatabase – ~ 1200 lines

• SendCDOEmail – ~ 100 lines

• NewDateTimeStamp – ~ 100 lines

• DeleteFiles – ~ 100 lines

• Master Script, 12 Steps – ~ 2700 lines

• LogToDatabase – ~ 1200 lines

• SendCDOEmail – ~ 100 lines

• NewDateTimeStamp – ~ 100 lines

• DeleteFiles – ~ 100 lines

Process FlowProcess Flow

Step 1 – Rename Old Macro Log File

Step 2 – Flag File Processing Start

Step 3 – SQL Condition Processing

Step 4 – Rename Old Transformer Cube Build Log

Step 5 – Backup the Existing Cubes

Step 6 – Delete Expired Logs and MDC Files

Process Flow (continued)Process Flow (continued)

Step 7 – Backup the Transformer Model

Step 8 – Build from Transformer Model

Step 9 – Cube Validation

Step 10 – Cube Build Move to Production

Process Flow (continued)Process Flow (continued)

Step 12 – Flag File Processing Finish

On Macro Completion – Send Email Notifications

• Success – Macro & Transformer Logs

• Called-Off – Macro Log Only

• Failure – Macro & Transformer Logs

On Macro Completion – Send Email Notifications

• Success – Macro & Transformer Logs

• Called-Off – Macro Log Only

• Failure – Macro & Transformer Logs

Step 11 – SQL Update of Flag Record

Success EmailSuccess Email

Called-Off EmailCalled-Off Email

Failed EmailFailed Email

PrerequisitesPrerequisites

For this script to operate the following must be installed:

• Windows NT 4.0 SP5 or 2000 Server SP1• PowerPlay Transformation Server (trnsfrmr.exe)

• CognosScript Editor (RunMac32.exe)

• PowerPlay Enterprise Server Administration Tools (PPAdminTool.exe)

• SMTP (Simple Mail Transport Protocol) Enabled on Server (KB: 117908)

For this script to operate the following must be installed:

• Windows NT 4.0 SP5 or 2000 Server SP1• PowerPlay Transformation Server (trnsfrmr.exe)

• CognosScript Editor (RunMac32.exe)

• PowerPlay Enterprise Server Administration Tools (PPAdminTool.exe)

• SMTP (Simple Mail Transport Protocol) Enabled on Server (KB: 117908)

Macro HeaderMacro Header

Step HeaderStep Header

Setting of VariablesSetting of Variables

• All Variables for this script are set in one location (Except Email Body)

• Variables are grouped by Category• File / Folder Location• Cube Build Conditional• Email Notification Recipients• PowerPlay Enterprise Server

• All Variables for this script are set in one location (Except Email Body)

• Variables are grouped by Category• File / Folder Location• Cube Build Conditional• Email Notification Recipients• PowerPlay Enterprise Server

Variable DeclarationVariable Declaration

Flag Files & SQL QueryFlag Files & SQL Query

Conditional Cube Build VariablesConditional Cube Build Variables

Email NotificationEmail Notification

Email Notification VariablesEmail Notification Variables

PPES VariablesPPES Variables

PowerPlay Enterprise ServerPowerPlay Enterprise Server

Additional ResourcesAdditional Resources

• CD Provided at Conference

• http://www.bmorrishome.org

• Cognos Support Website

• Other Forums (Yahoo Groups, etc)

• CD Provided at Conference

• http://www.bmorrishome.org

• Cognos Support Website

• Other Forums (Yahoo Groups, etc)

Question & AnswerQuestion & Answer

??“It’s not Difficult, just Complex” (Morris, 2002)