210 likes | 437 Views
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). Brian Morris. Data Warehousing Advisor Kerr-McGee Shared Services, LLC.
E N D
Automating the Cube Build/Publish ProcessUsing CognosScript Brian Morris, CBIP BI-340 – Cutting Costs in Half by Automating the Cube Build Process Cognos Forum 2004 (June 27-30, Orlando, Florida)
Brian 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
Requirements 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
Solution 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 Structure • Master Script, 12 Steps – ~ 2700 lines • LogToDatabase – ~ 1200 lines • SendCDOEmail – ~ 100 lines • NewDateTimeStamp – ~ 100 lines • DeleteFiles – ~ 100 lines
Process 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) 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) Step 11 – SQL Update of Flag Record 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
Prerequisites 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)
Setting 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
Flag Files & SQL Query Conditional Cube Build Variables
Email Notification Email Notification Variables
PPES Variables PowerPlay Enterprise Server
Additional Resources • CD Provided at Conference • http://www.bmorrishome.org • Cognos Support Website • Other Forums (Yahoo Groups, etc)
Question & Answer ? “It’s not Difficult, just Complex” (Morris, 2002)