Академический Документы
Профессиональный Документы
Культура Документы
Editor’s note: This article is based on Brian Morris’ award-winning presentation at the Cognos Forum held in June 2004
in Florida. Morris was voted People’s Choice winner as the top presenter at the Forum.
The topic I chose to present at the Cognos Forum ’04 was Automating the PowerPlay Cube Building Process. This is a topic
that is very near and dear to my heart. In the past three years, my company has gone from building just three cubes to more
than 60 cubes a day. With the vast majority of these cubes being built between midnight and 8:00 a.m., having an effective
automation strategy was critical.
What started with 20 lines of code that simply built and published a single cube has grown into 4,000-plus lines of code that
meet a wide range of business requirements. The business sets these requirements and it is our responsibility as architects and
administrators to design and build systems that meet or exceed them.
My company required cube builds to be initiated in one of three methods. The first method is to initiate the cube build based
on the presence of a flag file, a specific file at a specific location. These flag files are most often created at the end of a data
warehouse load or other ETL process. The second method is to simply schedule cube builds at a given time and/or date using
batch files kicked off by NT Scheduler. The third and most common method at my company is to initiate the cube build after
a specific SQL condition is met. In this third method the condition most frequently checked every 15 minutes during a given
window in time, i.e. from 1 a.m. to 5 a.m.
Another business requirement was to have email/pager notifications built into our cube build process. Notifications of
success, failure, or called-off cube builds are sent both to system administrators as well as to the data/process owners of each
cube. These notifications include a detailed cube build macro log and the PowerPlay Transformer log.
The most important business requirement in my view is to validate cube build success prior to publishing to production. No
cube is published into our production environment until a series of checks on the build are performed. These checks help to
ensure that no incomplete or failed cubes make it to the production environment. Nothing harms business intelligence
initiatives faster than delivering faulty or inaccurate information to the end users.
To implement this strategy, I chose to use the CognosScript macro language. This is very similar to Visual Basic with the
addition of specific Cognos properties and methods. This language comes bundled with PowerPlay Transformer and allows
for 100% customization to our needs.
Using CognosScript, I have developed a 12-step process for building cubes. During and after the Cognos Forum, I was
contacted by more than 200 attendees and fulfilled their requests for CDs that contain working examples of the 12 steps.
Hundreds more copies of this 12-step process have been downloaded at no charge from my Web site (bmorrishome.org).
What follows is a brief description of each of these steps and some of the basic principles I use in our production
environment. The DemoCubeBuildScript.mac macro and associated files can be downloaded using the link at the bottom of
this article. While the script is written in a way that will allow you to adapt it to your environment, I recommend that you
have a good working knowledge of CognosScript if you plan to use the demo macro. Customization will be required
primarily in the section below the embedded comment that reads “' Set the locations and preferences in this section. This
section is the only place you need to modify for building new Transformer Models (PYI files).” Questions about the macro
should be directed to brian@bmorrishome.org and not to Supportlink or Cognos Customer Support.
The 12 Steps
A structured build and publish process is a critical component of my company’s success in deploying PowerPlay to a large
number of clients. This process is more important than any specific line of code or method of execution. Plan your process
carefully and make it as comprehensive and as flexible as possible.
While there are several thousand lines of code and comments in my process, less than 30 of them need to be changed when
moving a new Transformer model into production. These changes are all made to variables at the top of the macro that
enables rapid deployment and a consistent environment.
Conclusion
Attending the Cognos Forums benefits me and my company in two important ways. The first is to provide me specific
methods on how to accomplish specific tasks. Whether in a session or in talking with another attendee, I continue to learn
new techniques that I bring home and implement. Secondly, and most importantly, I am exposed to new ideas and new ways
of meeting customer needs. Getting a fresh perspective and harvesting the best practices of others at the conference is
invaluable. I always leave the conference with a list of items I want to implement in my environment.
/supported/supportlink/15n2/techreview01_script_demo.zip
mailto:brian@bmorrishome.org