tutorial decision stream cognos

117
BETTER DECISIONS EVERY DAY Tutorial

Upload: fer

Post on 24-Apr-2015

513 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Tutorial Decision Stream Cognos

B E T T E R D E C I S I O N S E V E R Y D A Y ™

Tutorial

Page 2: Tutorial Decision Stream Cognos

<HEAD><meta name="last-review" content="13-06-2001"><meta name="title" content="Decision Stream Tutorial"><meta name="product" content="decisionstream"><meta name="version" content="6.0"><meta name="prodversion" content="decisionstream-6.0"><meta name="area" content="support"><meta name="classification" content="documentation"></HEAD>

Page 3: Tutorial Decision Stream Cognos

Cognos DecisionStream™ Version 6.0

This document published August 1999.

Copyright © 1995-1999 Cognos Incorporated.

Portions Copyright © Microsoft Corporation, One Microsoft Way, Redmond,Washington 98052-6399 USA. All rights reserved.

This software/documentation contains proprietary information of CognosIncorporated. All rights are reserved. Reverse engineering of this software isprohibited. No part of this software/documentation may be copied,photocopied, reproduced, stored in a retrieval system, transmitted in any formor by any means, or translated into another language without the prior writtenconsent of Cognos Incorporated.

Cognos, the Cognos logo, Better Decisions Every Day, Axiant, BI University,Cognos Accelerator, Cognos BI Applications, COGNOSuite, DataMerchant,DecisionStream, Impromptu, NovaView, PowerCube, PowerHouse,PowerPlay, Scenario and 4Thought are trademarks or registered trademarks ofCognos Incorporated in the United States and/or other countires. All othernames are trademarks or registered trademarks of their respective companies.

While every attempt has been made to ensure that the information in thisdocument is accurate and complete, some typographical errors or technicalinaccuracies may exist. Cognos does not accept responsibility for any kind ofloss resulting from the use of information contained in this document.

This page shows the publication date. The information contained in thisdocument is subject to change without notice. Any improvements or changesto either the product or the document will be documented in subsequenteditions.

Page 4: Tutorial Decision Stream Cognos

Contents

Preface About this Tutorial .......................................................................... viiTypographical Conventions................................................................. viiTimes.................................................................................................. viii

Chapter 1 Introducing DecisionStream ........................................................... 9The Designer Interface........................................................................ 11

Chapter 2 Concepts ......................................................................................... 15DecisionStream Catalogs..................................................................... 15Connections......................................................................................... 16Data Sources........................................................................................ 16Dimensional Framework..................................................................... 17Builds................................................................................................... 18Dimension Builds................................................................................ 18Data Transformation............................................................................ 18Metadata.............................................................................................. 19Data Delivery....................................................................................... 19

Chapter 3 Introducing the Tutorial Exercises ............................................... 21

Chapter 4 Creating the Catalog ...................................................................... 23Creating the ODBC Data Source......................................................... 23Creating the Catalog............................................................................ 25

Chapter 5 Connecting to the Data .................................................................. 27Connecting to the Reference Database................................................ 28Connecting to the Sales and Stock Databases...................................... 29Creating a Data Mart Database............................................................ 29

Chapter 6 Dimensions and Hierarchies ......................................................... 31Dimensions.......................................................................................... 31Hierarchies........................................................................................... 33Lookups............................................................................................... 35The Fiscal Hierarchy........................................................................... 36

Examining the Data...................................................................... 36Constructing the Fiscal Hierarchy................................................ 38Viewing the Fiscal Hierarchy....................................................... 39Hierarchy Definitions................................................................... 41

Page 5: Tutorial Decision Stream Cognos

iv Contents DecisionStream Tutorial

Hierarchy Level Attributes........................................................... 41DataStream Structure.................................................................... 42

The Product Hierarchy......................................................................... 44Constructing the Product Hierarchy............................................. 45Viewing the Product Hierarchy.................................................... 47

Fostering................................................................................ 47The Location Hierarchy....................................................................... 49

Constructing the Location Hierarchy............................................ 49Viewing the Location Hierarchy.................................................. 53

Summary.............................................................................................. 54

Chapter 7 Builds ............................................................................................... 55Copying a Table.................................................................................. 57

Creating the Build........................................................................ 57Testing the Build.......................................................................... 59

Aggregation and Derivation................................................................ 61About Build Elements.................................................................. 61About this Build........................................................................... 62Creating the Build........................................................................ 62Executing the Build...................................................................... 66Viewing the Execution Log.......................................................... 66Viewing the Delivered Data......................................................... 67Anatomy of a Build...................................................................... 69

The Build Tree...................................................................... 69DataStreams.......................................................................... 70Build Elements...................................................................... 71Procedures............................................................................. 72Delivery Modules.................................................................. 72

Multiple Data Sources......................................................................... 73Duplicating an Existing Build...................................................... 73Adding a Data Source................................................................... 74

Creating Build Elements....................................................... 74Adding the New Data Source................................................ 75Viewing the New Mappings.................................................. 76Modifying the Properties of the period_no Dimension......... 77Testing the Build................................................................... 79

Adding Inventory Information............................................................. 80Aggregation Exceptions............................................................... 80Dimension Domain Properties..................................................... 80

Dynamic Domain.................................................................. 81Reference Domain................................................................. 81

Creating the Build........................................................................ 82Creating a Duplicate Build.................................................... 82Creating New Build Elements............................................... 82Changing the Domain Type of Element period_no............... 84Adding the New Data Source................................................ 84Viewing the New Mappings.................................................. 86

Partitioned Delivery............................................................................. 87

Page 6: Tutorial Decision Stream Cognos

DecisionStream Tutorial Contents v

Creating a Duplicate Build........................................................... 88Adding the Delivery Modules...................................................... 88

Delivering Data to a Cognos BI Mart.................................................. 90Viewing the Results...................................................................... 92PowerPlay Dimensions................................................................. 94

Delivering Data to Microsoft OLAP Services..................................... 95Viewing the Results.................................................................... 100

Glossary ........................................................................................ 101

Index .............................................................................................. 113

Page 7: Tutorial Decision Stream Cognos

vi Contents DecisionStream Tutorial

Page 8: Tutorial Decision Stream Cognos

About this Tutorial

This tutorial provides a quick start for new users of DecisionStream Designer.It contains essential information and examples. It begins with an introductionto DecisionStream and follows with the basic concepts that you mustunderstand to work with this product.

Practical exercises follow the basic concepts. While working through theexercises, you will connect DecisionStream to source data, establish thedimensionality of that data, define multi-dimensional aggregation, and deliverthe aggregated data to a data mart. You will also create builds that deliverdata in a format suitable for specific analysis tools, for example, CognosPowerPlay and Impromptu.

The final section of this tutorial is a glossary that defines technical terms thatyou encounter when working with DecisionStream.

This tutorial does not describe the advanced features of DecisionStream. Forfull information on using the DecisionStream Designer, please refer to theDecisionStream User’s Guide. In addition to using the Designer, theDecisionStream components can be run from the command line andspecifications defined manually. For more information please refer to theLanguage and Command Line Interface (CLI) Guide.

For information on installing DecisionStream, please refer to the InstallationGuide.

Typographical ConventionsThis tutorial uses these typographical conventions:

Convention… Used for…

Bold Windows, menus, menu items, buttons, and otheron-screen objects are shown in bold. For example,theReferencewindow.

SMALL BOLD CAPITALS Keys on the computer keyboard, for exampleCTRLor DELETE .

Page 9: Tutorial Decision Stream Cognos

viii About this Tutorial DecisionStream Tutorial

Monospace Font Text that you type at the keyboard. For example,‘Into the Namebox, typeExamples Datamart ’.

A note containing additional information.

TimesFor your guidance, this list gives an estimate of the time required to completethe tutorial. These times are rough estimates only and may vary considerablyfrom the times that you actually take to complete the sections.

� The Concepts chapter should take approximately half an hour tocomplete.

� The Practical Exercises should take 3 to 4½ hours to complete.Because each exercise builds on its predecessors, you must completethe exercises in the order in which this tutorial presents them.

Page 10: Tutorial Decision Stream Cognos

C h a p t e r 1

Introducing DecisionStream

DecisionStream is a powerful Extract Transform and Load (ETL) product thatcan extract transaction data and transform it to deliver best practicedimensional data mart solutions. Enterprises can deliver business intelligenceapplications as a whole, from the transformations and loading of data marts, tothe deployment of business models and reports, with consistency from end toend.

The main DecisionStream unit is the build. Each build is a specification of thedata that DecisionStream extracts, the transformation of that data, and thetargets to which DecisionStream delivers it.

DecisionStream has two major components:

� The DecisionStream Designer

� The DecisionStream Engine.

You use the DecisionStream Designer to define and test builds that you candeploy for execution on any platform that the DecisionStream Enginesupports. DecisionStream uses an innovative dimensional reference model(the Dimensional Framework) to enable the management of data marts of allshapes and sizes and across many different platforms. It uses the DimensionalFramework to enable massive-scale data aggregation in a fraction of the timepossible with hand-made solutions or with SQL-based data warehouseloaders.

The Dimensional Framework is a multi-dimensional model of the datawarehouse. DecisionStream can use this to populate many OLAP targets andcan do this inexpensively in comparison to hand-coding or SQL-based tools.

DecisionStream catalogs are central repositories for DecisionStreamconfiguration details. In its catalogs, DecisionStream Designer stores:

� Specifications of connections to source and target databases

� The Dimensional Framework

� DecisionStream builds.

Page 11: Tutorial Decision Stream Cognos

10 Introducing DecisionStream DecisionStream Tutorial

This approach enables you to initially define database connections and theDimensional Framework, and then reuse this information for a large numberof builds.

DecisionStream supports these platforms:

Component Supported Platforms

DecisionStream Designer Windows NT 4 (with service pack 2)Windows 95 and 98

DecisionStream Engine WindowsWindows NT 4 (SP2)Windows 95Windows 98

UNIX – including:HP-UX 10.20 or aboveSun Solaris SPARC 2.5.1 or aboveIBM AIX 4.2 or aboveCompaq Tru64 UNIX 4.0 or above

DecisionStream can completely aggregate operational data in a single pass,irrespective of the complexity. It uses the Dimensional Framework to create alogical, multi-dimensional model of the target data mart, creating a specificroutine to aggregate data for this model in a single pass. The DecisionStreamengine does not rely on SQL-style aggregation techniques. The time that anSQL-based tool takes to perform aggregation increases exponentially with thenumber of dimensions. With DecisionStream, the increase is linear whichmeans that DecisionStream can deliver data extremely quickly.

DecisionStream can partition the delivered data both horizontally andvertically. It can even deliver partitions to different targets and differentformats. The target data mart need not exist prior to data delivery. Ifrequired, DecisionStream creates the data structure before populating it.

DecisionStream includes a wide range of aggregation functions that supportmany different types of OLAP analysis. It supports selective aggregation sothat you can reduce processing time and storage requirements by omittingunwanted aggregation on dimensional intersections.

DecisionStream can create and maintain its rules and definitions in any datasource to which it can connect.

DecisionStream provides wizards to simplify creating hierarchies and builds.However, you can create DecisionStream hierarchies and builds entirely byhand. You can also edit, by hand, hierarchies and builds that you createdusing the wizards.

Page 12: Tutorial Decision Stream Cognos

DecisionStream Tutorial Introducing DecisionStream 11

The Designer Interface

The DecisionStream Designer has two windows: theBuild window and theReferencewindow. In theReferencewindow, you define the hierarchies andlookups that make up the Dimensional Framework. In theBuild window, youdefine DecisionStream builds.

TheBuild andReferencewindows represent the builds and referencestructures in tree format. You can expand or collapse any node of theBuildandReference Datatrees by clicking the plus or minus icon to its left. Mostnodes have associated properties dialog boxes. In these dialog boxes, you canmodify the properties of the object that the node represents.

To open aProperties dialog box, select the node for the object and then doone of:

� Click Properties editor on the toolbar

� Right-click the node and then chooseProperties from the shortcutmenu

� PressF4.

Page 13: Tutorial Decision Stream Cognos

12 Introducing DecisionStream DecisionStream Tutorial

You define database connections in theConnectionsdialog box.

Connections dialog box

To open this dialog box, clickEdit connection definitions on thetoolbar.

The toolbar provides quick access to the main components of theDecisionStream Designer. The following table gives a brief description ofeach toolbar button:

Create a new catalog Opens theNew Catalogdialog box where youcan create a catalog.

Open an existingcatalog

Opens theOpen Catalogdialog box where youcan select the catalog with which to work.

Save current catalog Saves all the changes that you have made to thecurrent catalog.

Edit build definitions Switches to theBuild window.

Edit referencedefinitions

Switches to theReferencewindow.

Edit connectiondefinitions

Switches to theConnectionsdialog box.

Execute the currentbuild

Executes the current build using the defaultsettings.

Properties editor Opens theProperties dialog box for the selecteditem in the build or reference tree.

Run SQLTerm tool StartsSQLTerm. This enables you to run SQLstatements against any data source accessible toDecisionStream.

Page 14: Tutorial Decision Stream Cognos

DecisionStream Tutorial Introducing DecisionStream 13

Run Build Wizard Guides you through the creation of a build thattakes input data from one or more tables anddelivers fact data and/or dimension data to selectedtarget databases.

Run Dimension BuildWizard

Guides you through the creation of a dimensionbuild to implement a star or snowflake schema.

Run HierarchyWizard

Guides you through the creation of a hierarchy.

Run Date HierarchyWizard

Guides you through the creation of a datehierarchy.

Run break/sparsityadvisor

Assists you when deciding on which dimensions tobreak, and also when ascertaining sparsity.

Run aggregationadvisor

Analyzes the output levels of all the hierarchiesassociated with a build and shows graphically howdifferent level combinations within the delivereddata may be generated from stored data.

Show BuildVisualization

Reveals (or hides) theBuild Visualization pane.

Zoom in Enlarges the size of the objects in theBuildVisualization pane.

Zoom out Reduces the size of the objects in theBuildVisualization pane.

Refresh BuildVisualization

Restores objects in theBuild Visualization paneto their original size.

Copy overview toclipboard

Copies the contents of theBuild Visualizationpane to the clipboard, from where you can paste itinto another application.

TheZoom in, Zoom out, Refresh Build Visualization, andCopy overviewto clipboard buttons are only available when theBuild Visualization paneis displayed.

Page 15: Tutorial Decision Stream Cognos

14 Introducing DecisionStream DecisionStream Tutorial

Page 16: Tutorial Decision Stream Cognos

C h a p t e r 2

Concepts

Before starting the Practical Exercises, you should understand the conceptsand philosophies that DecisionStream employs.

This illustration shows the top-level objects within a DecisionStream catalog.It also illustrates the flow of data between these objects, from the data sources,and to the target data marts.

DecisionStream CatalogsEach DecisionStream catalog provides a central repository for the informationthat defines how DecisionStream extracts, transforms, and delivers data.Physically, DecisionStream maintains this information in database tables.You can store a DecisionStream catalog in either a dedicated database or adatabase that is used for other purposes (for example, a target data mart).

Page 17: Tutorial Decision Stream Cognos

16 Concepts DecisionStream Tutorial

In the DecisionStream Designer, theBuild window shows the builds anddimension builds of the catalog; theReferencewindow shows the referencestructures (the hierarchies and lookups) of the Dimensional Framework.

ConnectionsEach connection provides the information that enables DecisionStream toconnect to a database. A connection:

� Identifies the particular database.

� Specifies the connection method that DecisionStream must use toconnect to the data.

� Provides information that the database management system (DBMS)requires when DecisionStream connects to the data. For example,the username and password.

Connections decouple DecisionStream builds and reference structures fromthe source and target databases. Notwithstanding differences in SQL dialect,they enable you to change, with minimal impact, the physical database towhich a connection relates. For example, the connections mechanism enablesyou to develop builds on one computer and deploy those builds on another.

Data SourcesDecisionStream can extract data from a variety of sources. In addition tonormalized, operational data, it can extract data from de-normalized datamarts and even from delimited text files. Where the source data containshierarchical information, you can configure DecisionStream to only acceptdata at hierarchy levels that you specify.

DecisionStream supports several DBMSs including Oracle, Informix, Sybase,SQL Server, DB2 and ODBC. It also includes its own driver (SQLTXT) thatallows DecisionStream to connect to delimited text (ASCII or EBCDIC) datasources. Thus, DecisionStream can connect to many databases or applicationswhich support delimited text exports.

You configure DecisionStream to interact with these sources by creatingconnections. Each connection establishes the database object and connectionmethod that DecisionStream uses. Overall, having created the appropriateconnections, you treat all data sources in an identical manner. However, youshould always interact with each data source using its own dialect of SQL.

Page 18: Tutorial Decision Stream Cognos

DecisionStream Tutorial Concepts 17

Examples of this are when using SQLTerm and when fine-tuning SQLstatements.

Dimensional FrameworkDecisionStream achieves most of its power and flexibility by use of aninnovative dimensional reference model (called the Dimensional Framework).It uses this to enable massive-scale aggregation in a single pass and in afraction of the time that other tools require.

The dimensions of business data represent the core components of a businesswhich are categorized for analysis.

Within its catalogs, DecisionStream uses hierarchies to define businessdimensions. The Dimensional Framework consists of multiple hierarchiesthat represent the structure of the data independently of any source database.DecisionStream allows unlimited hierarchies, and thus unlimiteddimensionality.

You can build DecisionStream hierarchies from the most appropriate source:

� From reference tables. Corporate databases may contain reference(or ‘master’) tables. For example, such a table can define a range ofallowable values (the dataset of the dimension). Where they exist,you can use these tables to define DecisionStream hierarchies, andhence data dimensions. This approach generally has the advantagethat DecisionStream need interrogate a smaller quantity of data toobtain the appropriate domain.

� From the fact data itself. Use this where no reference tables exist, orwhere you cannot guarantee referential integrity between thereference tables and the fact data.

� From static elements. DecisionStream supports static hierarchies.That is, you define each hierarchical level and every member of thehierarchy by hand.

For even greater flexibility, you can combine these methods within a singlehierarchy. The DecisionStream Hierarchy Wizard simplifies the definitionprocess for most hierarchies. You can also create complex hierarchydefinitions by hand, or hand-modify definitions that the Hierarchy Wizardcreates. Thus, DecisionStream provides both flexibility and ease of use.

Page 19: Tutorial Decision Stream Cognos

18 Concepts DecisionStream Tutorial

BuildsEach DecisionStream build is a complete specification for the extraction ofdata, transformation of that data, and delivery of that data to the target datamarts. Builds that perform aggregation do so along dimensions that theDimensional Framework defines. Each build can acquire data from many datasources; merge, clean, and perform aggregation; and deliver the fact data,dimension data, and metadata to many targets.

You can use the Build Wizard to create builds. You can also hand-modify thebuilds that the Build Wizard creates, or create builds entirely by hand.

Dimension BuildsEach dimension build acquires data from the hierarchy or lookup that youspecify and delivers it to the target data mart. You can choose to deliver thedimension data to a single table (star schema), one table per hierarchy level(snowflake schema), or partitioned by custom criteria.

You can use the Dimension Build Wizard to create dimension builds. Youcan also hand-modify the dimension builds that the Dimension Build Wizardcreates, or create dimension builds entirely by hand.

Data TransformationDecisionStream builds can acquire data from multiple data sources. In manycases, the data will have different naming and storage formats. For example,dates may be stored as Julian dates, as strings in American format, or asstrings in European format; physically, the values may exist as string,numeric, or date data types.

Consistency is a prime requirement for data marts and warehouses. Forexample, no matter how each operational system may store dates, all datesmust exist in the data warehouse in the same format.

DecisionStream enables powerful transformations through derivation featureswhich can be used to provide data consistency.

Page 20: Tutorial Decision Stream Cognos

DecisionStream Tutorial Concepts 19

MetadataMetadata is data about data. It defines the structure and, to some extent, thesemantics of the fact data. Without metadata, the content of your datawarehouse is meaningless. Metadata is instrumental in transforming raw datainto information.

In an operational environment, metadata provides information for softwaredevelopers and database administrators. End users typically interact withoperational databases via on-line transaction processing (OLTP) systems.These users do not need to know the structure of the data. They interact withan OLTP system via on-screen forms that give all the context information thatthey need.

This is not the case in a decision support environment. Here, data analystsand executives search for useful facts that are often unrecognizable untilfound. These users have chiefly ad-hoc demands on the data and it would beimpossible to provide them with a parametric interface. Metadata providesthe context to help meet these users needs. It defines the underlying structureof the data; allowing reporting tools to rapidly process user requests. It alsoprovides aliases; allowing reporting tools to caption the data moremeaningfully.

Data DeliveryFrequently, reporting of analysis data must be available at different levels ofgranularity, that is, summarized at different hierarchical levels. Normally, thehighest levels of summarization receive the highest levels of usage.Therefore, pre-calculating the higher levels has a significant benefit toreporting tool performance.

Security considerations may dictate that different data columns reside atdifferent locations. For example, a company may wish to maintain personalinformation apart from account information.

DecisionStream can deliver three types of data:

� Fact data — facts, or values. For example, the number of productsand the dates of manufacture.

� Dimension data — data that defines the core business components.For example, the range of product identifiers.

� Metadata — data that defines the structure of the fact data anddimension data.

Page 21: Tutorial Decision Stream Cognos

20 Concepts DecisionStream Tutorial

DecisionStream can deliver the results of a single build into a single table, orpartition it by criteria that you choose. It can partition the delivered datahorizontally, vertically or in a combination of the two. It can simultaneouslydeliver different partitions to different targets, even at different physicallocations.

Page 22: Tutorial Decision Stream Cognos

C h a p t e r 3

Introducing the TutorialExercises

The practical exercises in the following chapters give you an opportunity towork with DecisionStream Designer. You will configure DecisionStream toacquire data from multiple data sources, transform the data, and deliver it(with metadata) to various targets.

Each exercise continues from its predecessors. Therefore, you shouldundertake the exercises in the order in which this tutorial presents them.

While working through these chapters, you will:

1 Create an ODBC data source in which to store the Examples Catalog.

2 Create the empty Examples Catalog.

3 Establish connections to:

� The Tutorial Reference database

� The Tutorial Sales database

� The Tutorial Stock database.

4 Create a data mart, together with an ODBC data source in which to storethe results of the exercises.

5 Establish the dimensionality of the data by creating these hierarchies:

� A fiscal hierarchy

� A hierarchy of products and product classes

� A hierarchy of geographical locations.

6 Starting with a simple table copy, produce progressively more-complexbuilds. You will create builds to:

� Copy a table from one database to another

� Produce summary and derived data from a single table

Page 23: Tutorial Decision Stream Cognos

22 Introducing the Tutorial Exercises DecisionStream Tutorial

� Acquire data from multiple data sources

� Handle inventory information by using an aggregation exception

� Partition the delivered fact data

� Create and populate a Cognos BI Mart

� Deliver to Microsoft OLAP Services.

These exercises require ODBC and the Microsoft® Access ODBC driver.

To check whether your computer has ODBC and the Microsoft AccessODBC driver:

1 On the WindowsStart menu, point toSettingsand then chooseControlPanel.

2 In theControl Panel, look for theODBC or ODBC32 icon. It this is notpresent, then your computer does not have ODBC.

3 Double-click theODBC or ODBC32 icon. TheODBC Data SourceAdministrator opens.

4 In theDrivers tab, look for an entry, ‘Microsoft Access Driver (*.mdb)’or similar. If this entry is not present, then your computer does not havethe required driver.

5 Install ODBC and/or the Microsoft Access ODBC driver if necessary.

The exercises use the tutorial data files. You must install these when youinstall DecisionStream. You must have also install the corresponding ODBCdata sources. If you did not install the data files and ODBC data sources,please reinstall DecisionStream, choosing to install these components.

The Tutorial Catalog provides model solutions to each of the exercises. Yourecreate the Tutorial Catalog as you work through the examples. Therefore,you can check your work by opening the Tutorial Catalog and examining itscontents.

Page 24: Tutorial Decision Stream Cognos

C h a p t e r 4

Creating the Catalog

A DecisionStream catalog consists of data tables that describe connections,hierarchies, and builds. It can reside in any data source to whichDecisionStream can connect.

Creating the ODBC Data SourceIn this exercise, you create an ODBC data source and base this upon a newMicrosoft Access database.

You must create the required ODBC data source before you can create thecatalog.

To create the ODBC data source in which to store the Examples Catalog:

1 If it is not running, start DecisionStream Designer. In theOpen Catalogdialog box, clickCancel.

2 From theTools menu, chooseODBC Administrator . TheODBC DataSource Administrator opens.

Page 25: Tutorial Decision Stream Cognos

24 Creating the Catalog DecisionStream Tutorial

3 Display theSystem DSNtab and then clickAdd. Select the MicrosoftAccess Driver and then clickFinish. TheMicrosoft Access Setupdialogbox opens:

Typical ODBC Microsoft Access Setup dialog box

4 Into theData Source Namebox typeExamples Catalog . Optionally,type a description into theDescription box.

5 Click Create. TheNew Databasedialog box opens. Enter the name forthe new database, and select the directory where it is to be stored. Forexample, the full path might beC:\DS_Tutorial\ExampleCat.mdb ).Click OK .

The directory, in which you create the database, must already exist. Ifnecessary, you should create this directory prior to creating the database.

6 Click OK in both the confirmation message box and theODBCMicrosoft Access Setupdialog box.

7 Click OK to close theODBC Data Source Administrator. Thiscompletes creating the ODBC data source.

Page 26: Tutorial Decision Stream Cognos

DecisionStream Tutorial Creating the Catalog 25

Creating the CatalogA DecisionStream catalog consists of a number of special data tables inwhich DecisionStream records the configuration of connections, builds, andreference structures.

Having established a suitable ODBC data source, you are ready to create theExamples Catalog.

To create the Examples Catalog:

1 On the toolbar clickCreate a new catalog. TheNew Catalogwizardopens:

2 Into theNamebox, typeExamplesCatalog . Into theCaption box, typeExamples Catalog . Optionally, type some text into theNotesbox.Click Next.

Page 27: Tutorial Decision Stream Cognos

26 Creating the Catalog DecisionStream Tutorial

The left pane of the dialog box shows the connection methods that areavailable on your computer. TheData Source Namelist on the right side ofthe dialog box lists the data sources to which you can connect by using theselected connection method.

3 SelectODBC from the connection types in the left pane. From theDataSource Namelist, chooseExamples Catalog. You can confirm that theconnection is valid by clickingTest Connection.

4 Click Finish. DecisionStream creates the tables for the catalog and thenopens the catalog.

Page 28: Tutorial Decision Stream Cognos

C h a p t e r 5

Connecting to the Data

In this chapter, you establish connections to the tutorial data.

When you install DecisionStream Designer, it creates three ODBC data sourcenames. These provide connections to three Microsoft Access databases thatthe DecisionStream Installer places in the folderC:\ProgramFiles\DecisionStream\Tutorial\MSAccess\ by default.This data models a retail company that has a many outlets that offer manyproducts for sales.

If the data sources do not appear within the ODBCData Source Nameslists, then please reinstall DecisionStream Designer, ensuring that you electto install the tutorial databases and the ODBC data source names.

This table lists the data source names and gives a brief description of theircontents:

Data Source Name Contents

DS Tutorial Reference Reference (or ‘master’) tables for the fiscalrange, range of locations, and product range.

DS Tutorial Sales Sales and revenue data for each product, ineach state, and during each fiscal period.

DS Tutorial Stock Data that describes the stock levels of eachproduct for each state and fiscal quarter.

In the following sections, you establish connections to the tutorial Reference,Sales, and Stock databases.

Page 29: Tutorial Decision Stream Cognos

28 Connecting to the Data DecisionStream Tutorial

Connecting to the ReferenceDatabase

To connect to the Reference database:

1 On the toolbar, click theEdit connection definitions button. TheConnectionsdialog box opens.

The Connections dialog box

2 In theConnectionsdialog box, clickNew. TheConnection Propertiesdialog box opens.

3 In theGeneral tab, typeTutorial Reference into theAlias box.Display theConnection Detailstab.

Properties for connection ‘Tutorial Reference’ (Connection Details tab shown)

Page 30: Tutorial Decision Stream Cognos

DecisionStream Tutorial Connecting to the Data 29

The left pane shows all the connection methods that DecisionStream can use.In this pane, the icons have these meanings:

The connection method is available on your computer.

The connection method is not available on your computer.

DecisionStream shows the connection methods that are not available on yourcomputer to enable you to design builds for deployment on a computer thathas the required connection method.

4 In the left pane, select ODBC, and from theData Source Namelist,selectDS Tutorial Reference.

5 Test the connection by clickingTest Connection. The system shouldrespond with a message, ‘Connection OK’. Close the message box byclicking OK .

6 Click OK again to close theConnection Propertiesdialog box.

7 The new connection,Tutorial Reference, appears in theConnectionsdialog box.

Connecting to the Sales and StockDatabases

In a similar manner to the previous exercise, create connections to the Salesand Stock databases:

� Create a connection named ‘Tutorial Sales’ that uses ODBC toconnect to the data source named ‘DS Tutorial Sales’.

� Create a connection named ‘Tutorial Stock’ that uses ODBC toconnect to the data source named ‘DS Tutorial Stock’.

When you have done this clickCloseto close theConnectionsdialog box.

Creating a Data Mart DatabaseDecisionStream requires somewhere to which it can deliver the results of theexample exercises. For this purpose, you should create a target databasewhich will be used to house the data marts.

Page 31: Tutorial Decision Stream Cognos

30 Connecting to the Data DecisionStream Tutorial

To create an ODBC data source:

In a manner similar to Creating the ODBC Data Source on page 23, create anODBC data source named ‘Examples Datamart’. You can create theMicrosoft Access database in any suitable directory.

To connect to the data source:

In a manner similar to Connecting to the Reference Database on page 28,create a connection named ‘Examples Datamart’ to the ODBC data source thatyou have just created.

TheConnectionsdialog box should look like this:

Page 32: Tutorial Decision Stream Cognos

C h a p t e r 6

Dimensions and Hierarchies

In this chapter, you establish the dimensionality of the sample data and createhierarchies that model this.

DimensionsThe tutorial data is based on a trading company with these characteristics:

� The company is organized into geographical divisions.

� The retail products are categorized and product category managersexist at the corporate headquarters.

� The company has a fiscal year that is divided into quarters. Eachquarter has three periods of one calendar month.

This company will want to view its data by geographical division, by productcategory, and by time. These form the dimensions of the business.

You can visualize each dimension as an axis of a multi-dimensional space.The company has three dimensions; thus, you can visualize the data as a cube.Each intersection of these dimensions contains a single fact. For thiscompany, this how many units of a product were sold at one location in onemonth, for example, how many widgets were sold in Montana during July.

Page 33: Tutorial Decision Stream Cognos

32 Dimensions and Hierarchies DecisionStream Tutorial

You can roll-up the data along one or more dimensions to derive summaryinformation. For example, you can roll-up the data along the Locationdimension to derive a value for the number of units or widgets sold in alllocations during July:

Corporate databases may contain reference (or ‘master’) tables. For example,such a table can define a range of allowable values (a data set). Where they

Page 34: Tutorial Decision Stream Cognos

DecisionStream Tutorial Dimensions and Hierarchies 33

exist, you can use these tables to define DecisionStream hierarchies, andhence data dimensions.

HierarchiesThe Tutorial Reference database contains four reference tables. These definethe fiscal, geographical location, and product-range dimensions. From thesereference tables you can create DecisionStream hierarchies to model datadimensions. Within DecisionStream, each hierarchy represents a singledimension. DecisionStream uses hierarchy information when aggregatingdata, calculating derived values, and more. You should create one hierarchyfor each dimension by which you want to analyze the data.

DecisionStream implements hierarchies that are:

� Based upon the relationships between columns in the same data row.An example of this is the Fiscal hierarchy. The source table,ds_fiscal, includes these columns:

− fiscal_yr

− fiscal_qtr

− period_no

This represents a hierarchy of periods. Each year contains quarters;each quarter contains periods. In ascending hierarchical order,period_no fiscal_qtr fiscal_yr. Each data row identifies to whichyear, quarter and period it relates. You can see this graphically inthis illustration:

Page 35: Tutorial Decision Stream Cognos

34 Dimensions and Hierarchies DecisionStream Tutorial

� Based upon relationships between rows of the same table. Inrelational terms, these are recursive relationships. An example ofthis is the Product hierarchy. The source table, ds_product, includesthese columns:

− product_cd

− parent_product_cd

Within the parent_product_cd column, each row refers to theproduct_cd value of its parent. You can see this graphically in thisillustration:

� Based upon relationships between multiple data tables. Thehierarchy follows one-to-many relationships between the tables. Anexample of this is the Location hierarchy. Two tables, ds_timezoneand ds_location, contribute to this hierarchy. Each row inds_location refers to a row in ds_timezone. You can see thisgraphically in this illustration:

Page 36: Tutorial Decision Stream Cognos

DecisionStream Tutorial Dimensions and Hierarchies 35

� Not based on the data. Such hierarchies typically represent ‘natural’order. For example, consider dates. You can roll-up days to months;roll-up months to quarters; roll-up quarters to years.

DecisionStream provides a wizard with which you can create hierarchiesbased upon columns or rows of a single data table, or upon multiple datatables. It also has a wizard with which you can create date hierarchies.

You create, view, and modify hierarchies in theReferencewindow. WhenDecisionStream starts, this window is minimized at the bottom of theDecisionStream application window.

The Reference window for the Tutorial Catalog

For added flexibility, you can combine two or more hierarchy types within thesame hierarchy. For example, you can create a static top-level, create the nexttwo levels from the rows of a single table, and create the lower hierarchylevels from multiple tables. However, you must define such complexhierarchies by hand. For further information on defining hierarchies, pleaserefer to the User’s Guide.

LookupsDecisionStream uses reference structures to provide context for fact data. Itsupports two types of reference structure:

� Hierarchies – with members organized into multiple levels. Eachmember is related to members of the level above (its parents) and tothe level below (its children). The preceding section describes thesestructures.

� Lookups – single-level structures that you can consider as single-level hierarchies.

Page 37: Tutorial Decision Stream Cognos

36 Dimensions and Hierarchies DecisionStream Tutorial

Apart from the number of levels that each can contain, hierarchies andlookups are similar structures with which you interact in a similar manner.Thus, this tutorial concentrates on hierarchies and you should refer to theUser’s Guide for more information on lookups.

The Fiscal HierarchyThis hierarchy represents the fiscal periods of the company.

Examining the DataDecisionStream provides SQLTerm (and SQL Helper when you are definingSQL for a data source) to enable you to examine database data, or to assistyou when constructing SQL statements.

When you want to enter an SQL statement, you can construct it yourself, youcan use SQLTerm to help you, or you can combine the two methods by usingSQLTerm to construct the statement and then refine it yourself.

To examine the data:

1 Start SQLTerm by clicking theRun SQLTerm tool button on thetoolbar. SQLTerm opens.

SQLTerm

Page 38: Tutorial Decision Stream Cognos

DecisionStream Tutorial Dimensions and Hierarchies 37

The window consists of a toolbar and three panes. TheDatabase Objectspane displays a ‘tree view’ of the current database through which you canbrowse. The SQL statement is shown in theSQL Query pane, and when thestatement is executed, the result is shown in the lower pane.

The toolbar has three buttons and a list box:

Execute SQLTerm Executes the current SQL statement.

Execute one row Executes and returns one row (if the statementis a SELECT).

Interrupt currentprocessing

Interrupts processing.

List box Enables you to select the connection withwhich you want to work.

2 From the list box on the SQLTerm toolbar, selectTutorial Reference. IntheDatabase Objectspane, double-clickTutorial Reference to expandthis node.

3 Select the ds_fiscal table, hold downCTRL , drag the table to theSQLQuery pane and drop it. SQLTerm generates an SQL statement thatreturns the entire ds_fiscal table.

4 Click Execute SQL Queryon the toolbar. SQLTerm retrieves thefiscal data and shows it in itsResultspane.

This table reproduces the first few rows of this data:

fiscal_yr fiscal_yr_desc fiscal_qtr fiscal_qtr_desc period_no period_no_desc

1996 FY96 19961 FY96 Q1 199601 Jan-96

1996 FY96 19961 FY96 Q1 199602 Feb-96

1996 FY96 19961 FY96 Q1 199603 Mar-96

1996 FY96 19962 FY96 Q2 199604 Apr-96

1996 FY96 19962 FY96 Q2 199605 May-96

1996 FY96 19962 FY96 Q2 199606 Jun-96

1996 FY96 19963 FY96 Q3 199607 Jul-96

1996 FY96 19963 FY96 Q3 199608 Aug-96

1996 FY96 19963 FY96 Q3 199609 Sep-96

1996 FY96 19964 FY96 Q4 199610 Oct-96

Each data row gives an identifier and description for the fiscal year, the fiscalquarter, and the fiscal period to which it relates. Since each data row containsall the hierarchy levels, this is a hierarchy based upon the columns of the samedata row.

Page 39: Tutorial Decision Stream Cognos

38 Dimensions and Hierarchies DecisionStream Tutorial

Constructin g the Fisca l HierarchyTo construct this hierarchy:

1 Click Run hierarchy wizard on the toolbar. The Hierarchy Wizardopens.

2 Select Create the hierarchy fr om the columns of one table (StarSchema) and then click Next.

3 Into the Name box, type Fiscal . Optionally, type a caption and notes.Click Next.

4 The wizard displays the available connections in the left pane. Expandthe Tutoria l Reference node by clicking the plus to it’ s left. Select theds_fiscal table. The right pane shows the columns of this table. TheHierarchy Wizard should look like this:

Click Next.

5 Most companies do not aggregate data over more than a fiscal year. Tomodel this, ensure that the Include a top level with an ‘All ’ membercheck box is cleared. Click Next.

6 Select the Fiscal node and then click the Create a new level button.The Level Details dialog box opens. Enter these details:

� Into the Name box, type Year .

� Click the button next to the Source column for id box. The SelectColumn dialog box opens. In this dialog box, select fiscal_yr, andthen click OK .

� In a similar manner, enter fiscal_yr_desc into the Source columnfor caption box.

Page 40: Tutorial Decision Stream Cognos

DecisionStream Tutorial Dimensions and Hierarchies 39

7 Click OK .

8 In a manner similar to steps 6 and 7, create two further hierarchy levelsnamed ‘Quarter’ and ‘Period’. To do this:

a. Select the levelYear and click theCreate a new levelbutton.

b. In theLevel Detailsdialog box, typeQuarter into theNamebox,choosefiscal_qtr andfiscal_qtr_descas the name and captionrespectively, and then clickOK .

c. Select the new levelQuarter and click theCreate a new levelbutton.

d. In theLevel Detailsdialog box, typePeriod into theNamebox,chooseperiod_no andperiod_no_descas the name and captionrespectively, and then clickOK .

The hierarchy should look like this:

9 Click Finish to close the wizard.

10 Finally, store the hierarchy definition by clickingSave CurrentCatalog on the toolbar.

Viewing the Fiscal HierarchyTo view the new hierarchy:

1 In theReferencewindow, select theFiscal hierarchy and chooseHierarchy Explorer from theReferencemenu.

2 Check thatFiscal (H) is selected in theReference Itemlist and clickOK .

3 The Fiscal hierarchy opens in theHierarchy Explorer .

Page 41: Tutorial Decision Stream Cognos

40 Dimensions and Hierarchies DecisionStream Tutorial

Hierarchy ‘Fiscal’ in the Hierarchy Explorer

In theElementspane, you can expand and collapse each element by clickingthe plus or minus to its left. When you select an element, its details show intheAttributes pane. These include the level at which the element resides, thenumber of parents and children that the element has, and a value for eachdataset attribute of the hierarchy level.

You can change the way that theHierarchy Explorer arranges theElementspane by clickingElements at Each LevelandHierarchicalRelationshipson the toolbar.

Each node has a composite label. This consists of the caption of the memberfollowed by its identifier in parentheses. For example, Jan-96 (199601).

The right pane of theHierarchy Explorer contains detailed informationabout the currently selected node.

Properties for member ‘199607’

This includes the level at which the member resides, the number of parentsand children, and the value of each attribute.

Page 42: Tutorial Decision Stream Cognos

DecisionStream Tutorial Dimensions and Hierarchies 41

Hierarchy DefinitionsIn DecisionStream, each hierarchy consists of a number of hierarchy levels.Each level of the hierarchy contains a set of members (the dataset of thelevel). The dataset of each level contains static and dynamic members. Youcreate static members within the definition of the hierarchy. They do notdepend on reference data and, as their name suggests, they do not change toreflect the contents of the reference data tables. DecisionStream applies anSQL statement to acquire dynamic members from the reference data tables.Thus, the set of dynamic members changes to reflect the contents of thesetables.

Each hierarchy member can relate to members from the level above (itsparents) and to members from the level below (its children). DecisionStreamconstructs the hierarchy according to these relationships. To understand thismechanism, you should examine the hierarchy that you have created:

Display theReferencewindow by clickingEdit reference definitions onthe toolbar.

Fully expand theFiscal hierarchy. It should look like this:

The hierarchy has a DataStream and three levels:Year, Quarter , andPeriod.Each level has a set of static members and a DataStream. DecisionStreamuses DataStreams to gather data sources to present a single stream of data toother DecisionStream objects.

Hierarchy Level AttributesSelect theQuarter level and clickProperties editor on the toolbar. In theLevel Propertiesdialog box, display theAttributes tab.

Page 43: Tutorial Decision Stream Cognos

42 Dimensions and Hierarchies DecisionStream Tutorial

Attributes for level ‘Quarter’

This tab shows the attributes for the level and, to the left of the attribute name,the properties of each attribute:

� ‘I’ indicates that the attribute provides the identifier for each datarow.

� ‘C’ indicates that the attribute provides the descriptive caption foreach data row.

� ‘P’ indicates that the attribute provides the link to the next highestlevel of the hierarchy (to the parent of the member).

� ‘S’ indicates that the attribute provides the surrogate key for eachdata row. Please refer to the User’s Guide for further information.

The Parent property is particularly significant. DecisionStream constructs thehierarchy by using the value of the Parent property to link each member to thelevel above. To understand from where DecisionStream obtains the values ofthe attributes, you should refer to the DataStream of the hierarchy.

DataStream StructureExpand the DataStream at the top of the hierarchy and examine its structure.Note that it has a single data source (Fiscal) and that this data source contains:

� An SQL node — specifies (in SQL) the dynamic data for thehierarchy

� A Literals node — specifies literal values (if any) for the hierarchy

Page 44: Tutorial Decision Stream Cognos

DecisionStream Tutorial Dimensions and Hierarchies 43

� A Mapping node — specifies the mapping between the DataStreamitems and the columns of the source data.

Select theSQL node and clickProperties editor on the toolbar.

SQL specification for the Fiscal hierarchy

In theData Source SQLdialog box, note that the SQL specification returns anumber of data columns. Close this dialog box.

Select theMapping node and clickProperties editor on the toolbar. TheData Source Mappingdialog box opens:

Mappings for the Fiscal hierarchy

Page 45: Tutorial Decision Stream Cognos

44 Dimensions and Hierarchies DecisionStream Tutorial

This shows how the source columns (marked) and literals (marked ) maponto the DataStream items (marked). In this case, the DataStream providesdata for the whole hierarchy. Because the DataStream provides data for morethan one level, DecisionStream qualifies each DataStream item by preceding itwith the appropriate level name. Note that a column can map to more thanone DataStream item. For example, this would happen if you wanted to usethe same source data column to provide both the identifier and the caption.DecisionStream maps each DataStream item to the level and attribute that hasthe same name, thus completing the mapping between the source data and theattributes of each hierarchy level.

DecisionStream populates the hierarchy from the data sources. It uses themapping specification to map the source columns onto the attributes anddetermines the parent of each member from the value of the Parent property.

The Product HierarchyThis hierarchy represents the product range of the company. The data lookslike this:

product_type product_cd product_name parent_product_cd unit_cost suggested_retail_price

Class 1 Bedroom Furniture

Class 2 Kitchen

Class 3 Sporting Goods

Product F01 King-size Bed 1 175 325

Product F02 Queen-size Bed 1 150 300

Product F03 Sofa 1 115 450

Product F04 Coffee Table 1 35 95

Product F05 Dining Table 1 80 150

Product K01 Salad Bowl 2 0.15 0.99

Product K02 Glassware Set 2 1.5 4.99

Product K03 Frying Pan 2 1.5 5

Product K04 Saucepan Set 2 12 55

Product K05 Cutlery Set 2 3.56 9.99

Product S01 Baseball Glove 3 2.1 5.99

Product S02 Baseball Bat 3 1.34 7.99

Product S03 Pool Cue 3 3.5 7.99

Product S04 Tennis Racket 3 10.5 19.99

Product S05 Tennis Balls 3 0.75 2.99

Product L01 Dictionary 2.14 8.99

Page 46: Tutorial Decision Stream Cognos

DecisionStream Tutorial Dimensions and Hierarchies 45

You can examine this data in SQLTerm by in a manner similar to theinstructions in Examining the Data on page 36. You should control-drag theds_product table to the SQL Query pane of SQLTerm.

Each data row defines the entry as either a product or a product class. Wherethe entry is a product, with one exception, it contains a reference to its productclass. That is, for products, the parent_product_cd column references theproduct_cd value of the product class (for example, Tennis balls have aparent_product_cd value of 3, indicating that they belong in the SportingGoods product class). This is a hierarchy based upon the relationship betweenrows of the same table.

The product (L01, Dictionary) does not relate to any product class.However, DecisionStream can provide a foster parent for this entry. Youcan see the results of this when you explore the generated hierarchy.

Constructing the Product HierarchyTo construct this hierarchy:

1 Click Run hierarchy wizard on the toolbar. TheHierarchy Wizardopens.

2 SelectCreate the hierarchy from the rows of one tableand then clickNext.

3 Into theNamebox, typeProduct . Optionally, type a caption and notes.Click Next.

4 The wizard displays the available connections in the left pane. ExpandtheTutorial Reference node by clicking the plus to it’s left. Select theds_product table. The right pane shows the columns of this table. TheHierarchy Wizard should look like this:

Page 47: Tutorial Decision Stream Cognos

46 Dimensions and Hierarchies DecisionStream Tutorial

Click Next.

5 You must now identify the source columns for the hierarchy:

� Click the button next to theColumn for Id . TheSelect Columndialog box opens. In this dialog box, selectproduct_cd, and thenclick OK .

� In a similar manner enterparent_product_cd into theColumn forParent box,product_name into theColumn for Caption box, andproduct_type into theColumn for Level Name box.

The wizard should look like this:

Source columns for the hierarchy ‘Product’

Click Next to progress to the next step of the wizard.

6 Assume that the company wants to summarize data for the entire productrange. This requires a top-level ‘ALL’ member of the hierarchy. Toachieve this, selectInclude a top level with an ‘ALL’ member , andclick Next (thus, accepting default values).

The hierarchy should look like this:

7 Click Finish to close the wizard.

8 Finally, store the hierarchy definition by clickingSave CurrentCatalog on the toolbar.

Page 48: Tutorial Decision Stream Cognos

DecisionStream Tutorial Dimensions and Hierarchies 47

Viewing the Product HierarchyTo view the hierarchy:

1 In theReferencewindow, select theProduct hierarchy and chooseHierarchy Explorer from theReferencemenu.

2 Check thatProduct (H) is selected in theReference Itemlist and clickOK .

3 The Product hierarchy opens in theHierarchy Explorer :

Hierarchy ‘Product’ in the Hierarchy Explorer

Expand the nodes in theElementspane and examine the generated hierarchy.The hierarchy contains the top-level ‘ALL’ member that you specified in step6. Beneath this are the members that have a product_type value of ‘Class’;beneath these are the products.

Fostering

Note that DecisionStream has created an additional member for the Class level(Unknown Class). This member is a foster parent for all products that haveno explicit product class. Beneath this member, DecisionStream has placedthe member (Dictionary (L01) ) that does not relate to any class. This is theDecisionStream fostering mechanism in action.

To understand the DecisionStream fostering mechanism, you must inspect theproperties of the hierarchy.

Page 49: Tutorial Decision Stream Cognos

48 Dimensions and Hierarchies DecisionStream Tutorial

To examine the hierarchy’s properties:

1 Display theReferencewindow by clickingEdit reference definitionson the toolbar.

2 Fully expand theProduct hierarchy. It should look like this:

3 Select theClasslevel

4 Click Properties editor on the toolbar. Display theAttributes tab:

Attributes for level ‘Class’

This lists the attributes of the level ‘Class’, together with their properties.This is the second level of the hierarchy but it has no Parent attribute.DecisionStream provides its parent by fostering.

5 Select theStatic Membersnode in theAllProduct level.

Page 50: Tutorial Decision Stream Cognos

DecisionStream Tutorial Dimensions and Hierarchies 49

6 Click Properties editor on the toolbar. TheStatic Membersdialogbox opens.

Static members for level ‘AllProduct’

Note that theFoster column is selected for the memberALL . This tellsDecisionStream that the static member is the parent for all members of thenext-lowest level that have no explicit parent.

Within any level, you can specify at most one member as a foster parent.

Exactly the same principle applies at the lower levels of the hierarchy.DecisionStream can automatically generate a foster parent (for example,Unknown Class) for all members of the next-lowest level that have noexplicit parent (for example,Dictionary ).

The Location HierarchyThis hierarchy represents the geographical locations of the company. Thedata resides in two related tables (ds_location and ds_timezone), whereds_location.timezone_cd references ds_timezone.timezone_cd. You canexamine the data in SQLTerm.

Constructing the Location HierarchyThis is a hierarchy based upon multiple, related tables.

To construct this hierarchy:

1 Click Run hierarchy wizard on the toolbar. TheHierarchy Wizardopens.

2 SelectCreate the hierarchy from multiple tables (Snowflake Schema)and then clickNext.

Page 51: Tutorial Decision Stream Cognos

50 Dimensions and Hierarchies DecisionStream Tutorial

3 Into theNamebox, typeLocation . Optionally, type a caption andnotes. ClickNext.

4 Assume that the company wants to summarize its data for allgeographical areas. This requires a top-level ‘ALL’ member of thehierarchy. To achieve this, selectInclude a top level with an ‘ALL’member, and clickNext (thus accepting default values).

5 Create the Timezone level. To do this, select theAllLocation node andclick theCreate a new levelbutton. In the dialog box that opens:

� Into theNamebox, typeTimezone .

� From theSource Databaselist, selectTutorial Reference.

� Click the button next to theSource Tablebox. TheSelect Tabledialog box opens. Select theds_timezonedatabase and clickOK .

� Click the button next to theSource column for Id box. TheSelectColumn dialog box opens. Select thetimezone_cdcolumn andclick OK .

� In a similar manner, entertimezone_nameinto theSource columnfor Caption box.

� From theSource column for Parentlist, select(link to foster) .This specifies that members of the Timezone level have no explicitparent and that DecisionStream should attach them to the ‘ALL’member that you created in step 4.

Page 52: Tutorial Decision Stream Cognos

DecisionStream Tutorial Dimensions and Hierarchies 51

The dialog box should look like this:

Click OK .

6 Create the State level. To do this, select theTimezonenode and clicktheCreate a new levelbutton. TheLevel Detailsdialog box opens:

� Into theNamebox, typeState

� From theSource Databaselist, chooseTutorial Reference

� Into theSource Tablebox, enterds_location

� Into theSource column for Id box, enterstate_cd

� Into theSource column for Captionbox, enterstate_name

� Into theSource column for Parentbox, entertimezone_cd.

Page 53: Tutorial Decision Stream Cognos

52 Dimensions and Hierarchies DecisionStream Tutorial

Most multi-table hierarchies follow the one-to-many relationships inherent innormalized, operational data. For example, in the State level,ds_location.timezone_cd is a foreign key that refers to the primary key of thetable from which the members of the next highest level come. You can seethis relationship in the following diagram.

Relationship between tables ‘ds_timezone’ and ‘ds_location’

The dialog box should look like this:

Click OK .

The hierarchy should look like this:

Page 54: Tutorial Decision Stream Cognos

DecisionStream Tutorial Dimensions and Hierarchies 53

9 Click Finish to close the wizard.

10 Finally, store the hierarchy definition by clickingSave CurrentCatalog on the toolbar.

Viewing the Location HierarchyYou can view the hierarchy in theHierarchy Explorer .

To view the hierarchy:

1 In theReferencewindow, select theLocation hierarchy and chooseHierarchy Explorer from theReferencemenu.

2 Check thatLocation (H) is selected in theReference Itemlist and clickOK .

3 The Location hierarchy opens in theHierarchy Explorer .

Hierarchy ‘Location’ in Hierarchy Explorer

Expand the nodes in theElementspane and examine the generated hierarchy.The hierarchy contains the top-level ‘ALL’ member that you specified in step4. Beneath this are the members that come from the table ds_timezone and,beneath these, those from the table ds_location.

As with the Product hierarchy, this hierarchy contains a single, top-level,static member. This member that acts as a foster parent for all members of theTimezone level.

Page 55: Tutorial Decision Stream Cognos

54 Dimensions and Hierarchies DecisionStream Tutorial

SummaryDuring the preceding exercises, you constructed:

� A hierarchy based on the columns of one reference data table

� A hierarchy based on the rows of one reference data table

� A hierarchy based on multiple reference data tables.

Additionally, DecisionStream supports static hierarchies. That is, hierarchieswhere you define each member by hand.

DecisionStream uses the concept of attributes to decouple the reference dataand the structure of the hierarchy. This approach affords great flexibility,allowing DecisionStream to build a single level from multiple data sources, ormany levels from a single data source.

DecisionStream supports four types of hierarchy. However, the abstractarchitecture of each type is the same:

� Each hierarchy consists of a DataStream and one or more levels.

� Each level has a set of attributes, a DataStream, and a set of staticmembers.

� Each DataStream can have one or more data sources, which map ontothe DataStream items. Each DataStream item maps to the attributesof the level that have the same name. Up to four attributes can have aspecial property.

− One attribute must have theId property. The value of thisattribute provides identification for each member.

− One attribute can have theCaption property. The value of thisattribute provides a meaningful name for each member.

− One attribute can have theSurrogate property. DecisionStreamcan use this artificial key to ensure consistency between datasources and to save disk space.

− One attribute can have theParent property. The value of thisattribute provides a reference to the next level up the hierarchy.

� At each level, you create static members by providing attributevalues for each static member.

DecisionStream builds the hierarchy structure from the levels and theirattributes. It then follows the data-to-attribute mappings to populate thehierarchy with reference data.

Page 56: Tutorial Decision Stream Cognos

C h a p t e r 7

Builds

Builds are central to DecisionStream Designer. They specify from whereDecisionStream acquires the data, how it performs aggregation and derivation,and to where DecisionStream delivers the data.

A build definition controls the entire process of data extraction, datatransformation, and data delivery. Consider an individual build as the smallestunit of work that DecisionStream can execute.

A DecisionStream build:

� Acquires data from the specified sources

� Dynamically builds the hierarchies and lookups that apply to thebuild

� Aggregates the data along the specified dimensions (hierarchies)

� Delivers fact data, dimension data, and metadata:

− To the specified targets

− At the specified hierarchy levels

− In the specified format (for example, using specific data typesand field lengths).

Page 57: Tutorial Decision Stream Cognos

56 Builds DecisionStream Tutorial

This illustration schematically shows the build process:

Having defined a set of connections and the Dimensional Framework, you candefine any number of builds to create and maintain the target data marts.

In this chapter, you create builds of increasing complexity. To create thebuilds, you use the Build Wizard, or copy and modify an existing build. Youstart with a build that copies a table from one database to another. Expandingon this, the builds that follow perform aggregation and derivation, acquire datafrom multiple data sources, and deliver the data partitioned to multiple targets.Other builds deliver data in a format suited to specific reporting tools.

You can create builds entirely by hand. However, this is outside the scope ofthis tutorial. For information on creating builds by hand, please refer to theUser’s Guide.

The Tutorial Catalog, which DecisionStream Setup installed with the tutorialdata, contains specimen solutions. You can use these to check your work asyou progress through the practical examples.

The tutorial invites you to execute some of the example builds in CheckOnly mode. It does this to avoid you having to wait too long beforecommencing work on the next build. However, this wait is only a fewminutes per build and you are free to execute each build in Normal mode(and to examine the results in SQLTerm) if you have the time available.

Page 58: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 57

Copying a TableCopying a table represents the simplest possible build. It acquires data from asingle table of one database and delivers it, unchanged, to a single table inanother database. You may wish to do this to transfer data from one DBMS toanother.

The source and target tables may have table/column names or sizes that areincompatible with the target database. DecisionStream does not adjust theseby default.

This example copies the ds_sales table from the Tutorial Sales database to theExamples Datamart.

Creating the BuildIn this example, you use the Build Wizard to create the build. The BuildWizard includes several templates and helps you to create builds quickly.

To create this build:

1 Click Run build wizard on the toolbar. TheBuild Wizard opens.

2 The first step of the Build Wizard enables you state that you want tocreate a new build to copy a table:

� SelectCreate a new build.

� From theSelect the template to use for this buildlist, selectDatatransfer. This states that you want to copy a table.

� SelectYesunderShould the build perform a full refresh? Thisstates that you want DecisionStream to delete then re-create the dataand indexes of the target table (if it exists).

Page 59: Tutorial Decision Stream Cognos

58 Builds DecisionStream Tutorial

Click Next.

3 Name the build by typing1_CopyTable into theNamebox and thenclicking Next.

4 Define the source data for the build:

� From theConnection list, selectTutorial Sales and clickNext.

� Select theds_salescheck box. The Build Wizard generates an SQLstatement to retrieve the table ds_sales. You can edit this statementshould it not meet your exact requirements. However, in this case,the default SQL is satisfactory.

TheBuild Wizard should look like this:

Page 60: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 59

5 Click Next. The Build Wizard shows the elements of the new build.They should look like this:

For each build template, the Build Wizard selects the most appropriateelement types. For a data transfer, all elements are attributes because thisprevents DecisionStream from performing any aggregation. The nextexample examines build elements in more detail.

Click Next.

6 You must now identify the target to which DecisionStream delivers thedata:

� From theConnection list, selectExamples Datamart.

� Select theDeliver Fact Data check box. Clear both theDeliverdimension dataandDeliver metadatacheck boxes.

By clicking theReviewbutton, you can see the settings thatDecisionStream applies to deliver the data. These settings include thenaming and partitioning strategies. However, for this build, the defaultsettings are satisfactory.

Click Finish to complete the build definition and close the Build Wizard.The new build appears in theBuild window and looks like this in theBuild visualization pane:

Build ‘1_CopyTable’ in the Build Visualization pane

You can reveal or hide theBuild Visualization pane by choosingShowView from theView menu.

Testing the BuildBefore testing the build, save the catalog to disk by clickingSave currentcatalogon the toolbar.

Page 61: Tutorial Decision Stream Cognos

60 Builds DecisionStream Tutorial

You can test the build by executing it in check only mode. DecisionStreamprovides three modes of build execution:

� Normal – DecisionStream fully executes the build. It builds thereference structures and acquires the source data. If required, itcreates the target fact tables, dimension tables, and metadatastructures. Finally, it delivers the fact data, dimension data, andmetadata.

� Object Creation – DecisionStream creates the target fact data tables,dimension data tables, and metadata tables. However, it does notdeliver any data.

� Check Only – DecisionStream executes the build as far as possible.However, it discards the data that it would deliver in Normal modeand does not process any metadata.

To test the build:

1 Select the build and from theBuild menu, chooseExecute Build. TheExecute Build dialog box opens.

Execute Build dialog box

2 From theExecution modelist, select Check Only.

This mode executes the build but discards the data that would be delivered inNormal mode. If you execute the build in Normal mode, you can useSQLTerm to examine the data that this build delivers.

3 Click OK .

Page 62: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 61

DecisionStream launches DataBuild in a DOS window. As the buildprogresses, DataBuild traces the progress and writes information to thescreen.

6 The build completes. PressENTER to close the DOS window.

Aggregation and Derivation

About Build ElementsDecisionStream uses build elements to provide a layer of abstraction betweenthe source data and the delivered data. Columns from the source data map tobuild elements. Delivery modules subscribe to a subset of these buildelements. This mechanism provides considerable flexibility, allowingDecisionStream to merge data from multiple data sources, partition the data,and deliver it to multiple targets.

DecisionStream supports four types of build element:

� Dimensions – data elements that are fundamental to dataorganization and provide context to numeric items of data. Theyare the keys they represent the business components by which youwant to analyze the data. Common examples are time, product, andlocation.

� Metrics – numeric or date values that holds a piece of informationfor analysis. Typically, metrics represent the key measures of abusiness. For example, units, revenue, and cost.

� Attributes – values that hold additional information that cannot beaggregated, such as color. DecisionStream does not performaggregation on attributes, giving them null values in summary data.

� Derivations – values that DecisionStream derives (that is,calculates) rather than obtains directly from the data source.DecisionStream can either calculate the value of a derivation ateach level of a hierarchy, or it can calculate the value of thederivation at the lowest level and then treat this value as though itwere a metric. The latter method, called ‘calculation at source’, caneliminate rounding errors in the summary data.

Page 63: Tutorial Decision Stream Cognos

62 Builds DecisionStream Tutorial

DecisionStream aggregates metric elements along dimension elements. Thatis, it produces summary data at the higher levels of a hierarchy to which adimension element relates. By default, DecisionStream produces this bysummation. However, it provides a large range of alternatives methods thatyou can use.

About this BuildIn this build, you configure DecisionStream to acquire data from the tableds_sales and deliver it, together with aggregations. You also create aderivation element calculated from two columns of the source data table. Thisdata table has five columns. The following table lists these columns andindicates whether each column represents a dimension or a metric. Where thecolumn represents a dimension, the table gives the associated hierarchy.Where the column is a metric, the table gives the aggregation method that youwill use for that column.

Column Element Type Hierarchy or Aggregation

period_no Dimension Fiscal Hierarchy

state_cd Dimension Location Hierarchy

product_cd Dimension Product Hierarchy

units_sold Metric Summation

revenue Metric Summation

You can configure the build to roll-up the data along any or all dimensions.When you do this, DecisionStream uses the aggregation method that youspecify to summarize the metrics at each hierarchy level. The defaultaggregation method is summation.

Creating the BuildTo create the build:

1 In theBuild window, clickRun build wizard on the toolbar. The BuildWizard opens.

2 DecisionStream displays the first step of the Build Wizard:

� SelectCreate a new build.

Page 64: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 63

� From theSelect the template to use for this buildlist, selectRelational Datamart.

� SelectYesunderShould the build perform a full refresh?

Click Next.

3 Name the build by typing2_Aggregation into theNamebox and thenclicking Next.

4 Define the source data for the build:

� From theConnection list, selectTutorial Sales and then clickNext.

� Select theds_salescheck box. The Build Wizard generates an SQLstatement to retrieve the table ds_sales. You can edit this statement.However, in this case, the default SQL is satisfactory.

5 Click Next. The Build Wizard shows the elements of the build. Thesehave the same names as those of the previous build. However, theelement types no longer default to ‘attribute’. The elements period_no,state_cd, and product_cd are now dimensions (indicated by the icon‘ ’); the elements units_sold and revenue are now metrics (indicated bythe icon ‘ ’). Check that this is the case. You can change the type ofan element by selecting that element and then clicking the appropriatebutton on the right.

The elements should look like this:

Click Next.

6 Here, you set the properties of the dimension elements. You choose thehierarchy that relates to each dimension. You also choose whether toperform aggregation along the dimension and whether to implementsurrogate keys. To do this:

� From the list in theUse Referencecolumn, select the hierarchy toassociate with each dimension:

− For theperiod_no dimension, selectFiscal (H)

− For thestate_cddimension, selectLocation (H)

− For theproduct_cd dimension, selectProduct (H).

� Clear each check box in theGenerate Surrogatescolumn.

Page 65: Tutorial Decision Stream Cognos

64 Builds DecisionStream Tutorial

� Select each check box in theCalculate Aggregatescolumn.

The table of dimension elements should look like this:

Click Next.

7 You must now identify the target to which DecisionStream delivers thedata. To do this:

� From theConnection list, selectExamples Datamart.

� Select theDeliver Fact Data check box, and clear both theDeliverdimension dataandDeliver metadatacheck boxes. TheBuildWizard should look like this:

� Configure the build to deliver fact data to a single table by:

a. ClickingReviewalongside theDeliver Fact Data check box.TheReview Fact Delivery Propertiesdialog box opens.

b. Displaying theGeneration tab.

c. In thePartition Build group, selectingUse this strategyandthen choosingAll data into a single table from the adjacent list.

� Change the name of the table to which DecisionStream delivers thedata by:

a. Display theNaming tab.

Page 66: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 65

b. In theTable Name/Prefixbox, enterds_sales_conso .

c. Click OK .

Click Finish. The Build Wizard closes and the build definition appears intheBuild window.

The Build Wizard simplifies the creation of most builds. This inevitablyremoves some of the flexibility that you have when directlymanipulating builds in the Build Tree. For example, the Build Wizardcannot create derivation elements and cannot partition data acrossdatabases. The User’s Guide describes in detail the direct manipulationof builds.

The Build Wizard cannot create derivation elements. Thus, you must editthe build definition to add a derivation element and to cater for productsthat do not appear in the Product hierarchy.

8 Add a derivation element named ‘unit_cost’ that returns the revenuedivided by the number of units sold per product per location per period oftime. To do this:

a. In theBuild window, expand2_Aggregation. Select theElementsnode and from theBuild menu selectInsert Derivation . TheDerivation Properties dialog box opens.

b. Into theNamebox, typeunit_cost .

c. Select theCalculate at Sourcecheck box. This causesDecisionStream to calculate the derivation at the lowest level of eachhierarchy and then to treat it as a metric.

d. Display theCalculation tab. Into the box, enterrevenue/units_sold . You can type this directly into the box.However, DecisionStream provides shortcuts to all valid elementnames, reference attributes, operators, and functions. To accessthese, right-click the box and then choose from the shortcut menu.

e. Display theAggregation tab. From theCalculate list, selectAVG .This specifies that you require DecisionStream to return the averageunit cost in the summary data.

f. Click OK . DecisionStream offers to add the new element to eachdelivery module in the build. ClickOK .

9 Modify the dimensionproduct_cd to cater for products that do notappear in the Product hierarchy. To do this:

a. In theBuild window, select theproduct_cd element and then clickProperties editor on the toolbar. TheDimension Propertiesdialog box opens.

Page 67: Tutorial Decision Stream Cognos

66 Builds DecisionStream Tutorial

b. Display theReferencetab and selectInclude Unmatched Memberscheck box and then clickOK . This specifies that DecisionStreamshould include product data that has no corresponding member of theProduct hierarchy. DecisionStream provides foster parents for thesemembers.

10 Click OK .

Select the node at the top of the build. In theBuild Visualization pane, thebuild should look like this:

Build ‘2_Aggregation’ in the Build Visualization pane

Executing the BuildBefore executing the build, save the catalog to disk by clickingSave currentcatalogon the toolbar.

To execute the build:

1 Select the build and clickExecute Build on the toolbar. This executesthe build in Normal mode, using the default properties.

DecisionStream launches DataBuild in a DOS window.

As the build progresses, DataBuild traces the progress of the build,writing information to the screen and to a log file as the build executes.

2 The build completes. PressENTER to close the DOS window.

Viewing the Execution LogAs DecisionStream executes a build, it traces the progress of the build andwrites trace information to the screen. It writes the same trace information toa log file within its log directory (C:\Program Files\DecisionStream\Log bydefault). The file name of each log file is <build_name>_<number>.log,where <build_name> is the name of the build and <number> is a three-digitnumber. For example, the log file for the build 2_Aggregation might be2_Aggregation_001.log.

Page 68: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 67

To access the log files:

1 From the Tools menu, choose Browse Log Files. The DecisionStreamlog folder opens.

2 To view a log file, double-click its icon.

� If the ‘LOG’ extension has an association in Windows, the log fileopens in the associated program.

� If the ‘.LOG’ extension has no association, the Windows Open Withdialog box opens. In this dialog box:

a. Select a text editor, such as NOTEPAD.

b. If you want LOG files to always open with your chosen texteditor, then ensure the Always use this program to open thisfil e check box remains selected.

c. Click OK . The log fil e opens in your selected text editor.

Viewing the Delivered DataYou can view the delivered data in SQLTerm or any application that can workwith Microsoft Access databases.

To view the data in SQLTerm:

1 Click Run SQLTer m tool on the toolbar. SQLTerm opens.

2 From the toolbar list, select Examples Datamart .

3 In the Database Objects pane, expand the Examples Datamart databaseand then control-drag the table ds_sales_conso to the SQL Query pane.SQLTerm constructs an SQL statement to return the entire table.

4 Click Execute SQL Query on the toolbar. SQLTerm retrieves the dataand shows it in the lower pane.

Page 69: Tutorial Decision Stream Cognos

68 Builds DecisionStream Tutorial

Because this build performs aggregation, you can return summary data. Forexample, to return summary values for all products sold in the timezone‘Eastern Standard Time’ during 1996, you would add the clause:

WHERE period_no = '1996'AND state_cd = 'E'AND product_cd = 'ALL'

Page 70: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 69

Anatomy of a BuildIn this section, you examine the various objects that make up the build.However, this is not a thorough examination and you should refer to theUser’s Guide for full information on the components of a build.

The Build Tree

In theBuild window, fully expand the build2_Aggregationby clicking theplus icon to the left of each node. The Build Tree should look like this:

Build ‘2_Aggregation’ fully expanded

In the Build Tree, you can examine the properties of most nodes by selectingthe node and then performing one of these actions:

� Click theProperties editor toolbar button.

Page 71: Tutorial Decision Stream Cognos

70 Builds DecisionStream Tutorial

� Right-click the node and then chooseProperties from the shortcutmenu.

� PressF4.

The build consists of:

� A DataStream

� A set of Build Elements

� A set of Procedures

� Delivery Modules, in three categories:

− Fact Delivery Modules

− Dimension Delivery Modules

− Metadata Delivery Modules.

DataStreams

Each DataStream gathers a number of data sources to provide a consistentstream of data to the remainder of the build. You can add a data source to aDataStream by right-clicking the DataStream and then selectingInsert DataSourcefrom the shortcut menu.

Each data source can have an SQL statement that returns a number of datacolumns. The SQL statement can be any valid SELECT statement in thedialect of SQL of the DBMS. Therefore, the SQL statements can cope withsource data that has a compound primary key. For example, the following is avalid statement in the dialect of Microsoft Access:

SELECT country & state & city AS location,product,units_sold

FROM salesWHERE product_type = k01;

This SQL statement returns three columns (location, product, and units_sold).

The SQL statements of data sources can also contain joins (if the DBMSsupports them). However, it is frequently more efficient to use manyDecisionStream data sources than it is to specify joins within SQL.

With the exception of derivation elements, DecisionStream generates oneDataStream item for each build element. It does not create DataStream itemsfor derivation elements because DecisionStream does not acquire the data forthese directly from the data sources. You can see how the data source

Page 72: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 71

columns map to the DataStream items by selecting theDataStreamnode.The mappings appear in theBuild Visualization pane.

Data Source to DataStream mapping

You can change these mappings in theData Source Mappingpropertiesdialog box.

Data Source Mapping properties dialog box

The right pane of this dialog box lists the DataStream items (Build Elements).You map a DataStream item to a data source column by dragging the item tothe column.

Build Elements

DecisionStream supports four types of build element. These are:

� Dimension elements – the key business components by which youwant to analyze the data.

� Metric elements – the key measures of your business.

� Attribute elements – elements that are neither dimensions normeasures. For example, color.

� Derivation elements – elements that DecisionStream calculatesfrom the source data.

Page 73: Tutorial Decision Stream Cognos

72 Builds DecisionStream Tutorial

Each element has a properties dialog box with which you can configure theelement. Although you configure some elements in the examples that follow,you should refer to the User’s Guide for full information on elementproperties.

Procedures

DecisionStream procedures are SQL statements that DecisionStream invokesduring execution of the builds. The three types of procedures are:

� Pre – SQL statements that DecisionStream invokes at the start ofbuild execution.

� Pre-Data – SQL statements that DecisionStream invokes afterloading the reference data, but before it begins to acquire the factdata.

� Post – SQL statements that DecisionStream invokes after it hasfinished delivering the data.

The example builds do not make use of procedures. Therefore, you shouldrefer to the User’s Guide for information about their use.

Delivery Modules

As their name suggests, the delivery modules of a build deliver the fact data,dimension data, and metadata to the target data marts. There are three typesof delivery module:

� Fact Delivery Modules – deliver fact data.

� Dimension Delivery Modules – deliver dimension data.

� Metadata Delivery Modules – deliver metadata specific to aparticular OLAP tool.

By way of its delivery modules, a DecisionStream build can deliver datasimultaneously to multiple databases and database management systems; itcan simultaneously populate multiple OLAP targets; it can partition data bothhorizontally and vertically. You can disable individual delivery modules; youcan disable all delivery modules of a particular type. Thus, DecisionStreamdelivery modules enable flexible, precise control over data delivery. Pleaserefer to the User’s Guide for full information.

Page 74: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 73

Multiple Data SourcesIn this build, you add a second data source to the build that you createdpreviously. You will duplicate, and then modify, the previous build. Whiledoing this, you will learn how to:

� Duplicate an existing build

� Create new build elements

� Add a data source to an existing build

� Modify a dimension to accept source data at different levels ofgranularity.

Duplicating an Existing BuildTo duplicate an existing build:

1 Select the2_Aggregationbuild and from theBuild menu chooseDuplicate. DecisionStream creates a duplicate, named‘2_Aggregation:1’, of the build.

2 Rename the new build:

a. Select the new build and clickProperties editor on the toolbar.

b. In theBuild Properties dialog box, enter3_MultipleSource intoboth theNameandCaption boxes.

c. Click OK .

3 Rename the data source of the new build:

a. Expand3_MultipleSource and then its DataStream.

b. Select the data source2_Aggregationand clickProperties editoron the toolbar.

c. Into theNamebox of theData Source Propertiesdialog box, enterSalesSource .

d. Click OK .

Page 75: Tutorial Decision Stream Cognos

74 Builds DecisionStream Tutorial

Adding a Data SourceThe new data comes from the table ds_forecast in the Tutorial Sales database.You can inspect the structure of this table in SQLTerm. The followingillustration shows this structure:

DecisionStream can accept source data at different levels of granularity. Inthis example, as suggested by the column quarter_no, the table gives forecastinformation by fiscal quarters. The table ds_sales gives information by fiscalperiods. Therefore, to merge these data sources, DecisionStream must acceptdata at both the period and quarter levels of the Fiscal hierarchy.

Two columns (units_forecast and revenue_forecast) exist in the tableds_forecast but not in the table ds_sales. You must create new build elementsto cater for these columns. To do this:

Creating Build Elements

The new elements are metrics that correspond to the columns units_forecastand revenue_forecast.

To add the new build elements:

1 Expand the build3_MultipleSource.

2 SelectElementsand from theBuild menu chooseInsert Metric . TheMetric Properties dialog box opens.

3 Into theNamebox, typeunits_forecast .

4 Click OK . DecisionStream offers to add the new element to eachdelivery module in the build. ClickOK .

5 In a similar manner, create a new metric element named‘revenue_forecast’.

DecisionStream uses summation as the default aggregation function. Yourequire this aggregation function. Hence, you do not need to set thisexplicitly.

Page 76: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 75

Adding the New Data Source

To add the new data source

1 Select the DataStream of3_MultipleSource and from theBuild menuchooseInsert Data Source. TheData Source Propertiesdialog boxopens. Into theNamebox, typeForecastSource and then clickOK .

2 Expand the new data source and select theSQL node.

3 Click Properties editor on the toolbar.

4 From theDatabaselist, selectTutorial Sales and then clickSQLHelper.

5 In theDatabase Objectspane, double-clickTutorial Sales and thencontrol-dragds_forecastto theSQL Query pane.

TheSQL Helper window should look like this:

6 Click OK in SQL Helper and theData Source SQLdialog box.

7 Map the columns of the new data source to the appropriate buildelements. To do this:

a. Select theMapping node ofForecastSourceand clickPropertieseditor on the toolbar. TheData Source Mappingdialog boxopens.

Page 77: Tutorial Decision Stream Cognos

76 Builds DecisionStream Tutorial

b. In this dialog box, map each column to the appropriate build elementby dragging the element to the column:

� Drag theperiod_no element to thequarter_no column

� Drag thestate_cdelement to thestate_cdcolumn

� Drag theproduct_cd element to theproduct_cd column

� Drag theunits_forecastelement to theunits_forecastcolumn

� Drag therevenue_forecastelement to therevenue_forecastcolumn.

TheData Source Mappingdialog box should look like this:

Mappings for data source ‘ForecastSource’

c. Click OK .

Viewing the New Mappings

DecisionStream provides a graphical view of the data source columnmappings. To view this, select the DataStream of3_MultipleSource.DecisionStream shows the mappings in theBuild Visualization pane.

Page 78: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 77

Mappings for the DataStream of build ‘3_MultipleSource’

Modifying the Properties of the period_no Dimension

The table ds_forecast has no data at the Period level of the Fiscal hierarchy.Its lowest level is the fiscal quarter. Therefore, you must modify thedimension period_no to allow DecisionStream to accept source data at boththe Period and Quarter levels. To do this:

To modify the properties of period_no dimension:

1 Select theperiod_no element and clickProperties editor on thetoolbar. TheDimension Propertiesdialog box opens.

2 Display theReferencetab.

Page 79: Tutorial Decision Stream Cognos

78 Builds DecisionStream Tutorial

3 In theInput column, select the check box for the levelQuarter . Thedialog box should look like this:

4 Click OK .

Select the top node of the build. In theBuild Visualization pane, the buildshould look like this:

Build ‘3_MultipleSource’ in the Build Visualization pane

DecisionStream provides a graphical view of the relationship between thedimension elements and their associated hierarchies. This view also shows atwhich hierarchy levels DecisionStream accepts and delivers data. To see this,select any element. DecisionStream shows the view in theBuildVisualization pane.

Page 80: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 79

Dimension Element and Hierarchy relationships, build ‘3_MultipleSource’

In the preceding illustration, you can see that the Fiscal hierarchy acceptsdata at the Quarter and Period levels; the other hierarchies accept data onlyat the lowest level. Because the build performs aggregation, it can outputfact data at all hierarchy levels. However, you could modify this (in theproperties dialog box of the corresponding dimension element) to outputonly summary data.

Testing the Build

Before testing the build, save the catalog to disk by clickingSave currentcatalogon the toolbar.

You can test the build by executing it in check only mode.

To test the build:

1 Select the build and from theBuild menu chooseExecute Build. If youexecuted a previous build, then theTarget Table Checkdialog boxopens. This dialog box reports inconsistencies in the target tables.Click Drop Tables and then clickYesto confirm this action.

2 TheExecute Build dialog box opens.

3 From theExecution modelist, select Check Only.

4 Click OK .

Whenever you execute a build, DecisionStream checks whether thetarget tables exist and have the correct structure. If it findsinconsistencies, DecisionStream prompts you to drop the target tables.The previous build created the target table ‘ds_sales_conso’. However,the structure of that table is incorrect for this build.

Page 81: Tutorial Decision Stream Cognos

80 Builds DecisionStream Tutorial

DecisionStream launches DataBuild in a DOS window.

As the build progresses, DataBuild traces the progress and writesinformation to the screen.

5 The build completes. PressENTER to close the DOS window.

Adding Inventory InformationIn this build, you add inventory information to a duplicate of the previousbuild. The new data source contains inventory information with each rowgiving the stock held of a particular product, at a particular location, at thestart of a particular fiscal period. Before you can proceed, you should knowsomething of aggregation exceptions and dimension datasets.

Aggregation ExceptionsAssume that you want to know the total number of all items at a particularlocation or the total stock of a particular product for a given state or time zone.You obtain this by setting the aggregation method of the stock metric elementto SUM. Doing this sets the aggregation method to SUM for all dimensions.Unfortunately, summing inventory data along a time dimension means little.For example, if the stock holding of a product is 100 in month one, 120 inmonth two, and 80 in month three, then the sum for the period is 300.However, this exceeds the stock holding at any time during the period.

DecisionStream provides aggregation exceptions to deal with this type ofsituation. An aggregation exception instructs DecisionStream to deliver thefirst (or last) value of a particular metric when aggregating along a particulardimension. For example, using an aggregation exception, you can instructDecisionStream to deliver the stock level for the first (or last) period in eachquarter.

Dimension Domain PropertiesThe dataset of a dimension defines the set from which each member draws itsvalue. The domain of the dimension is the set of different values that existwithin the dimension. It is a subset of the dataset.

Page 82: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 81

Consider the period_no dimension. Its dataset is the set of periods, quarters,and years that lie within a contiguous fiscal time span. However, its domainmay not include one or more fiscal periods. For example, assume that thedataset includes all of 1998. At the end of October 1998, the source datawould not include data for November and December of 1998. Therefore, thedimension domain would not include those months. The followingillustrations show the dataset and domain respectively for the latter half of thatyear.

Dataset (left) and Domain (right) for the latter half of 1998.

Similarly, if the company did not trade during a particular period (forexample, if they were closed for vacation), then the source data (and hence thedimension domain) would not contain that period.

When delivering aggregation exceptions, DecisionStream must be able toidentify dataset members that are missing from the domain. Unless it can dothis, DecisionStream cannot determine the full range of each summaryhierarchy member (for example, it the preceding example, DecisionStreamcould not determine that the range for Q4 was {Oct, Nov, Dec}).

During build execution, DecisionStream constructs the domain of eachdimension. Either it can construct the domain from the associated hierarchy,or it can construct the domain dynamically from the source data. TheDomaintab of theDimension Propertiesdialog box enables you to specify fromwhere DecisionStream should obtain the domain of the element. TheDomainType column in this tab contains the optionsDynamic Domain andReference Domain.

Dynamic Domain

DecisionStream builds the domain from the source data it acquires.Therefore, the domain may not contain all members of the hierarchy dataset.

Reference Domain

DecisionStream obtains the domain from the hierarchy that relates to thedimension. Therefore, the domain consists of all values that are present in thehierarchy.

Page 83: Tutorial Decision Stream Cognos

82 Builds DecisionStream Tutorial

If you set the domain type toDynamic Domain, then DecisionStream cannotdeliver an aggregation exception for that dimension. Therefore, you mustalways set the domain type toReference Domainif you require anaggregation exception for the dimension.

Creating the Build

Creating a Duplicate Build

To create a duplicate build:

1 Select3_MultipleSource and from theBuild menu chooseDuplicate.DecisionStream creates a duplicate build, named3_MultipleSource:1.

2 Select the new build and clickProperties editor on the toolbar. TheBuild Properties dialog box opens.

3 Change the name and the caption to4_AddStock and then clickOK .

Creating New Build Elements

The new build elements cater for the inventory information. Each uses anaggregation exception to allow DecisionStream to deliver the stock value atthe first (or last) period of each quarter and year.

To create new build elements:

1 Expand the build4_AddStock.

2 Select theElementsnode and from theBuild menu chooseInsertMetric . TheMetric Properties dialog box opens.

3 Into theNamebox, typeopening_stock .

4 Display theAggregation tab and create the exception:

a. Select theException check box.

b. SelectFirst and, from the adjacent list, selectperiod_no.

Page 84: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 83

The dialog box should look like this:

c. Click OK . DecisionStream offers to add the new element to eachdelivery module in the build. ClickOK .

This metric element represents the opening inventory level for eachquarter, and year.

5 In a similar manner, create a metric element, named ‘closing_stock’, thathas an aggregation exception that returns the last value with respect to thedimension period_no. TheAggregation tab for this metric elementshould look like this:

This metric element represents the closing inventory level for eachquarter, and year.

Page 85: Tutorial Decision Stream Cognos

84 Builds DecisionStream Tutorial

Because DecisionStream cannot deliver an aggregation exception for adimension element that has a domain type other than ‘Reference Domain’,you must now change the domain type of the element ‘period_no’.

Changing the Domain Type of Element period_no

Changing the domain type of element period_no:

1 Select the elementperiod_no and clickProperties editor on thetoolbar. TheDimension Propertiesdialog box opens.

2 Display theDomain tab. From theDomain Type list, selectREFERENCE DOMAIN .

3 Click OK .

You must now add a data source to the build. From this data source,DecisionStream acquires the inventory information. DecisionStream canaccept data from multiple databases (and database management systems). Thedatabases need not reside on the same computer or run under the sameoperating system. However, when you execute the build, DecisionStreammust be able to access all the databases that contribute to the build. In thisexample, the inventory data comes from the table ds_stock in the TutorialStock database.

Adding the New Data Source

Adding the new data source:

1 Select the DataStream icon and from theBuild menu chooseInsertData Source. TheData Source Propertiesdialog box opens.

2 Into theNamebox, typeStockSource and then clickOK .

3 Expand the data sourceStockSourceand select theSQL node.

4 Click Properties editor on the toolbar.

5 From theDatabaselist, selectTutorial Stock and then clickSQLHelper.

6 In theDatabase Objectspane, double-clickTutorial Stock and thencontrol-dragds_stockto theSQL Query pane.

7 Click OK in SQL Helper and in theData Source SQLdialog box.

Page 86: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 85

8 Map the columns of the new data source to the appropriate buildelements. To do this:

a. Select theMapping node ofStockSourceand clickPropertieseditor on the toolbar.

b. In this dialog box, map the columns to the appropriate buildelements:

� Drag theperiod_no element to theperiod_no column

� Drag thestate_cdelement to thestate_cdcolumn

� Drag theproduct_cd element to theproduct_cd column

� Drag theopening_stockelement to thestock_unitscolumn

� Right-drag theclosing_stockelement to thestock_unitscolumn, thus adding it to the existing mapping.

TheData Source Mappingdialog box should look like this:

c. Click OK .

Two elements (opening_stock and closing_stock) map to the stock_unitscolumn.

9 Click Save Current Catalogto save your work.

Page 87: Tutorial Decision Stream Cognos

86 Builds DecisionStream Tutorial

Select the top node of the build. In theBuild Visualization pane, the buildshould look like this:

Build ‘4_AddStock’ in the Build Visualization pane

Test the new build using check-only mode. To do this:

1 In theBuild window, right-click the build and chooseExecute Buildfrom the shortcut menu.

2 If DecisionStream prompts you to drop the existing table ds_sales_conso:

a. ClickDrop Table

b. Click Yesto confirm this action

3 From theExecution modelist, selectCheck Only.

4 Click OK .

Viewing the New Mappings

To view a graphical representation of the mappings between the DataStreamand the data sources, in theBuild window, select the DataStream.DecisionStream shows the mappings in theBuild Visualization pane.

Page 88: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 87

Mappings for the DataStream of build ‘4_AddStock’

Partitioned DeliveryDecisionStream supports both horizontal and vertical partitioning of thedelivered fact data. It uses two mechanisms to support this.

Its subscription mechanism supports vertical partitioning (partitioning intocolumn subsets). That is, each delivery module subscribes to certain buildelements. DecisionStream delivers only those elements to which the deliverymodule subscribes. You met the concept of subscription when you addedelements to previous builds. When DecisionStream added the new elementsto the existing delivery modules, it caused those delivery modules to subscribeto the new elements.

Page 89: Tutorial Decision Stream Cognos

88 Builds DecisionStream Tutorial

DecisionStream supports horizontal partitioning (partitioning into rowsubsets) via filters. Within each delivery module, you can specify up to oneoutput filter and any number of level filters. Each level filter defines thehierarchical levels at which DecisionStream delivers the data via that deliverymodule. Thus, level filters enable you to create summary fact data tables atdifferent hierarchy levels. In this example, you use level filters to partition thedelivered data into three tables, one for each level of the Fiscal hierarchy.

Creating a Duplicate BuildCreate a duplicate build:

1 Select4_AddStockand from theBuild menu chooseDuplicate.DecisionStream creates a new build named4_AddStock:1.

2 Select the duplicate build and clickProperties editor on the toolbar. IntheBuild Properties dialog box, change both the name and caption to5_MultipleDelivery . Click OK .

3 The duplicate build has an unwanted delivery module that delivers all thedata into a single table. Remove this by expanding the build, then theDelivery Modules node, and then theFact Delivery Modulesnode.Select the delivery moduleds_sales_consoand from theBuild menuchooseDelete. Click OK to confirm the action.

Adding the Delivery ModulesYou can add the required delivery modules by hand. However, the BuildWizard can help you to add additional delivery modules to an existing build.You can choose an alternative template when you do this. Thus, this enablesyou to configure a build using more than one template.

In this example, you use the Build Wizard to add the required deliverymodules.

To add the delivery modules:

1 Click Run build wizard on the toolbar. TheBuild Wizard opens.

2 SelectAdd to an existing build and then select the build5_MultipleDelivery .

Page 90: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 89

3 From theSelect the template to use for this buildlist, chooseRelational Datamart. UnderShould the build perform a full refresh ,selectYes. Click Next.

4 From theConnection list, selectExamples Datamart. Select theDeliver Fact Data check box, and clear both theDeliver DimensionData andDeliver Metadata check boxes.

5 Click Review(adjacent toDeliver Fact Data). TheReview FactDelivery Properties dialog box opens. In thePartition Build group,selectUse settings that I will define. This causes two additional tabs(Split DimensionsandSplit Levels) to appear.

6 Define the dimension on which DecisionStream must partition the data.To do this:

a. Display theSplit Dimensionstab.

b. Selectperiod_no and clear bothstate_cdandproduct_cd.

7 Display theNaming tab. Establish the naming strategy for the deliveredtables. To do this, change the entry in theTable Name/Prefixbox tods .

The dialog box should look like this:

8 Click OK in this dialog box to return to theBuild Wizard .

9 Click Finish.

Page 91: Tutorial Decision Stream Cognos

90 Builds DecisionStream Tutorial

In theBuild window, select the buildMultipleDelivery . TheBuildVisualization Paneshould look like this:

Build ‘5_MultipleDelivery’ in the Build Visualization pane

Test the build using check-only mode.

Delivering Data to a Cognos BI MartThis example differs from the others in that it does not modify a previousexample. It acquires data from a single source table, and delivers it (withoutaggregation) to a Cognos BI Mart.

In addition to a Cognos Impromptu Catalog and a PowerPlay Transformermodel, DecisionStream creates a relational data mart (star schema) with thefact and dimension data. It optimizes the PowerPlay Transformer model toanalyze and report on this datamart. It also creates sample PowerPlay andImpromptu reports. From the PowerPlay reports, you can drill through toImpromptu to examine detailed data.

During execution of this build, DecisionStream invokes both PowerPlay andImpromptu. Therefore, you must have these Cognos products installed onyour computer to execute this build.

To create this build:

1 Click Run build wizard on the toolbar. TheBuild Wizard opens withtheCreate a new buildoption and theCognos BI Mart (Star)template selected. UnderShould the build perform a full refresh ,selectYes. Click Next

2 Into theNamebox, typeBIMartBuild . Click Next.

Page 92: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 91

3 Identify the source for the build:

a. From theConnection list, select theTutorial Sales connection.Click Next.

b. Select the check box adjacent to the tableds_sales.

The Build Wizard should look like this:

Click Next.

4 The Build Wizard shows the default elements for the build. For thisbuild, these are correctly defined. ClickNext.

5 Associate each dimension element with the appropriate hierarchy bychoosing the hierarchy from theUse Referencecolumn:

� For period_no, choose theFiscal hierarchy

� For state_cd, choose theLocation hierarchy

� For product_cd, choose theProduct hierarchy

� Click Next.

6 Specify the data that this build delivers:

a. From theConnection list, selectExamples Datamart.

b. Ensure that theDeliver Fact Data, Deliver Dimension Data, andDeliver Metadata check boxes are selected.

Page 93: Tutorial Decision Stream Cognos

92 Builds DecisionStream Tutorial

The Cognos BI Mart (Star) template automatically delivers metadata toboth PowerPlay and Impromptu. If you do not have one of theseproducts, you can choose not to generate metadata for that product. Todo this:a. Click theReviewbutton adjacent toDeliver Metadata.b. TheReview Metadata Deliveryopens.c. Clear the check box for the product you do not have.You can also use this dialog box to add metadata to support other OLAPtools. To do this, select the check box that corresponds to the requiredformat.

7 Click Finish to close the Build Wizard.

8 Execute the build inNormal mode.

In theBuild Visualization pane, the build should look like this:

Build ‘BIMartBuild’ in the Build Visualization pane

Viewing the ResultsTo view the results of executing this build, you must have both CognosPowerPlay and Cognos Impromptu installed on your computer.

In this part of the exercise, you drill down through the Location and Productdimensions in PowerPlay, and finally drill through to an Impromptu report.

Page 94: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 93

To view the results of executing this build:

1 From theTools menu, chooseBrowse Data Files. The DecisionStreamdata directory opens.

2 Locate the file BIMartBuild.mdc. This file is the PowerCube thatDecisionStream created when you executed the build. Double-click thisfile.

3 The PowerCube opens in PowerPlay Explorer and should look like this:

PowerCube ‘BIMartBuild.mdc’ in PowerPlay Explorer

4 Drill down the Location and Product dimensions:

a. On the PowerPlay Folder line, point to theLocation folder andchooseEastern Standard Time from the fly-out menu.

b. Point to theProduct folder and chooseKitchen from the fly-outmenu. The Folder line should now look like this:

PowerPlay Folder line

5 Drill through to an Impromptu report:

a. In the PowerPlay report, select the cell at the intersection ofFY97andFlorida .

b. From theExplore menu, chooseDrill Through . TheDrill Throughdialog box opens.

c. From theImpromptu Reports folder, choosef_bimartbuild thenclick OK .

Page 95: Tutorial Decision Stream Cognos

94 Builds DecisionStream Tutorial

d. This report opens in Impromptu:

Please explore the PowerCube in Cognos PowerPlay and drill through toImpromptu to see how easily you can access the data at any hierarchy levelcombination.

PowerPlay DimensionsWhen you executed the buildBIMartBuild , DecisionStream delivered theFiscal, Location, and Product hierarchies to PowerPlay and Impromptu. Youcan compare the PowerPlay dimensions with the DecisionStream hierarchies.

To compare the PowerPlay dimensions with the DecisionStreamhierarchies:

1 In PowerPlay, clickDimension Vieweron the toolbar. The PowerPlaywindow splits into two panes, the left of which contains a view of thedimensions.

2 In DecisionStream, restore theReferencewindow. Select theFiscalhierarchy, from theReferencemenu chooseHierarchy Explorer , andthen clickOK .

3 In both the PowerPlayDimension Viewpane and the DecisionStreamHierarchy Explorer , expand the Fiscal hierarchy, theFY96 node, andtheFY96 Q1 node.

Page 96: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 95

Hierarchy ‘Fiscal’ in DecisionStream Dimensions in PowerPlay

4 Compare the two views. Notice how they correlate.

5 Expand other nodes in both views and other hierarchies inDecisionStream Hierarchy Explorer, noting that the PowerPlaydimensions have the same structure as the DecisionStream hierarchies.

Delivering Data to Microsoft OLAPServices

This example acquires data from a single source table, and delivers fact dataand dimension data to the Examples Datamart. It delivers metadata to aMicrosoft OLAP Services database. The metadata consists of a virtual cubefor the build and a cube for the fact delivery.

During execution of this build, DecisionStream invokes the Microsoft OLAPServices Client. Before you can successfully execute this build:

� You must have the Microsoft OLAP Services Client installed on yourcomputer.

� Microsoft OLAP Services must contain a database that contains aDataSource definition that refers to the database into whichDecisionStream delivers the fact and dimension tables.

� You must configure a DecisionStream connection for the MicrosoftOLAP Services database.

Page 97: Tutorial Decision Stream Cognos

96 Builds DecisionStream Tutorial

To create the Microsoft OLAP Services DataSource:

1 Start the Microsoft OLAP Manager.

2 In the left pane, expand theOLAP servers folder.

3 On an appropriate server, create a database with the name ‘DS_Tutorial’.To do this:

a. Right-click the server and chooseNew Databasefrom the shortcutmenu.

b. Enter the nameDS_Tutorial and then clickOK .

4 Expand theDS_Tutorial database node, then theLibrary node.

5 Create the required data source. To do this:

a. Right-click theData Sourcesnode

b. In theData Link Properties dialog box, select the connection typefor the Examples Datamart (ExampleMart.mdb) database.

c. Click Next and enter the configuration information for the ExamplesDatamart database.

The left pane of the OLAP Manager should look like this:

To create a connection to the Microsoft OLAP Services database:

In DecisionStream Designer:

1 Click theEdit connection definitions toolbar button. TheConnectionsdialog box opens.

2 Click New. TheConnection Propertiesdialog box opens.

3 Into theAlias box, typeMSOLAP.

4 Specify the Microsoft Olap Services database. To do this:

a. Display theConnection Detailstab.

b. In the left pane, select theMS OLAP Servicesconnection type.

c. From theServer list, select the server on which you created theDS_Tutorial database.

Page 98: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 97

d. From theDatabaselist, selectDS_Tutorial.

5 Create a mapping between theExamples DatamartDecisionStreamconnection and the Microsoft OLAP Services data source that you createdearlier. To do this:

a. Click theEdit Mapping button. TheMSOLAP DataSourceMapping dialog box opens.

b. In the lower-left pane, double-click theExamples Datamartconnection. This connection is copied to the upper pane.

c. In the lower-right pane, double-click the DataSource entry. This iscopied to the upper pane, completing the required mapping.

TheMSOLAP DataSource Mapping dialog box should look likethis:

Click OK .

The name of the DataSource comes from Microsoft OLAPServices. Thus, it may differ from that shown in the precedingillustration.

Having created the Microsoft OLAP Services data source and theDecisionStream connection, you can use them with any number ofDecisionStream builds. This example delivers the fact data, dimension data,and metadata for the Tutorial Sales database.

Page 99: Tutorial Decision Stream Cognos

98 Builds DecisionStream Tutorial

To create this build:

1 Click theRun build wizard toolbar button. TheBuild Wizard openswith theCreate a new buildoption selected. From theSelect thetemplate to use for this build list, chooseMicrosoft OLAP ServicesDatamart. UnderShould the build perform a full refresh , selectYes.Click Next

2 Into theNamebox, typeMSOLAPBuild . Click Next.

3 Identify the source for the build:

a. From theConnection list, select theTutorial Sales connection.Click Next.

b. Select the check box adjacent to the tableds_sales.

The Build Wizard should look like this:

Click Next.

4 The Build Wizard shows the default elements for the build. For thisbuild, these are correctly defined. ClickNext.

5 Associate each dimension element with the appropriate hierarchy bychoosing the hierarchy from theUse Referencecolumn:

� For period_no, choose theFiscal hierarchy

� For state_cd, choose theLocation hierarchy

� For product_cd, choose theProduct hierarchy

Click Next.

Page 100: Tutorial Decision Stream Cognos

DecisionStream Tutorial Builds 99

6 Specify the data that this build delivers:

a. From theConnection list, selectExamples Datamart.

b. Ensure that theDeliver Fact Data, Deliver Dimension Data, andDeliver Metadata check boxes are selected.

c. Configure the build to deliver fact data into a single table. To dothis:

i. Click theReviewbutton next to theDeliver Fact Data checkbox. TheReview Fact Delivery Propertiesdialog box opens.

ii. Display theGeneration tab. In thePartition Build group,selectUse this strategyand chooseAll data into a single table.

TheReview Fact Delivery Propertiesdialog box should look likethis:

Fact Delivery Generation properties

Click OK .

7 Click Finish to close the Build Wizard.

The Microsoft OLAP Services Datamart template automatically deliversmetadata to the primary connection to Microsoft OLAP Services. Thisis the first connection that you create in the catalog. If you wantDecisionStream to deliver the metadata to a different Microsoft OLAPServices database, then you must edit the build by hand. Please refer tothe User’s Guide for information on editing builds.

Page 101: Tutorial Decision Stream Cognos

100 Builds DecisionStream Tutorial

In theBuild Visualization pane, the build should look like this:

Build ‘MSOLAPBuild’ in the Build Visualization pane

8 Execute the build inNormal mode.

Viewing the ResultsYou can view the results in the Microsoft OLAP Manager (shown below).You can also view the results in a suitable alternative OLAP tool.

The Delivered Cube in Microsoft OLAP Manager

Page 102: Tutorial Decision Stream Cognos

Glossary

Aggregation

The process of taking data at one level of detail and summarizing it to alower level of detail. The process can occur in a number of levelssimultaneously (multi-level aggregation) or even in a number ofdimensions simultaneously (multi-dimensional aggregation).

Alias

A shorthand identifier for a connection to a database.

ASCII

A common encoding for character values on UNIX and Windows NT/95systems.

Break

The identification of a change in the dimension sequence. It is used toimprove Engine performance and reduce memory usage.

Build

An DecisionStream unit of work that goes through the steps ofAcquisition, Transformation, and Delivery.

Build Element

One of a Build's dimensions, metrics, derivations, or attributes.

Calculate at Source

The calculation method used to obtain source derivations. A sourcederivation is calculated for detail data and aggregated as though it were ametric. It is the equivalent of performing a calculation in the SQL queryand then treating the resulting column as a metric.

Page 103: Tutorial Decision Stream Cognos

102 Glossary DecisionStream Tutorial

Calculation

Either the method used to generate a derivation, or the method used foraggregation of a metric.

Caption

A piece of information that is associated with a member id or name. Thisis often used (for display and presentation purposes) in preference to theid or name.

Catalog

A repository for storing DecisionStream Build, Reference, andConnection specifications.

Check Only

A method of executing a Build that results in the entire Build processbeing completed apart from the final delivery of data. It is generally usedduring development of a new Build.

Command Line

The name of a command, together with its associated arguments.

Component

A build, dimension build, collection, hierarchy, lookup, or connection in acatalog.

Connection

All the information that is required to make a connection to a database.The actual information that is required will vary based on the databaseand the connection method. DecisionStream collects this information andassociates it with a database alias for ease of reference.

Connection Method

The method of connection to a source of data. The method, named fromthe driver that the connection uses, is different for each database type.

Data Mart

A database that holds data for analysis. It usually implies that the dataand its organization is of limited scope or is targeted at a particular groupof users.

Page 104: Tutorial Decision Stream Cognos

DecisionStream Tutorial Glossary 103

Data Model

A system consisting of fact data and metadata.

Data Source

Somewhere from which the DecisionStream can acquire data.

Data Type

Any piece of information that DecisionStream processes has a data type.Often, DecisionStream's default data type is acceptable. However, youmay sometimes need to explicitly state the data type to use.DecisionStream's data types are:

CHAR - A piece of text

INTEGER - A positive or negative whole number

DOUBLE - A positive or negative floating-point number

DATE - A date and time

BOOLEAN - A value that can either be TRUE or FALSE.

Data Warehouse

A database that is used to hold data for analysis. The data may beaccessed directly by users or it may be used to feed data marts.Generally, the data warehouse is used as the source of reporting data forthe whole enterprise.

Database

Storage of data with software to manage access to the data.

Dataset

The possible set of items that can exist at a hierarchy level. Each memberof the dataset is a dataset attribute.

Dataset Attribute

Dataset attributes on a hierarchy level collectively make up the dataset.Each level data select can have columns mapped onto dataset attributes.A datatset attribute can have special significance, for example, when itrepresents the holder for the id of a hierarchy member. In this case it isexplicitly tagged as having special significance. Tags are available formember ids ($ID), captions ($CAPTION), and parents ($PARENT).

Page 105: Tutorial Decision Stream Cognos

104 Glossary DecisionStream Tutorial

This mechanism gives a layer of abstraction that allows DecisionStreamto build a single hierarchical level from multiple sources.

Date Hierarchy

The Designer generally builds hierarchies with reference to data inrelational tables. Often, this is not possible for dates because the data isfrequently not held in relational tables. The Designer provides a wizardthat you can use to generate a hierarchy of dates that is based on a daterange that you specify.

DBMS

Database Management System.

Delivery

The operation that results in data being delivered to target systems via thedelivery modules.

Delivery Module

A software module (in Windows, this is a DLL) that provides support fordelivery of data and metadata to a variety of target system types (forexample, relational databases).

Derivation

A metric that the DecisionStream derives (that is, calculates) rather thanobtains directly from the data source.

Designer

DecisionStream Designer is the Windows 95/98/NT software that you useto produce Build specifications and Dimensional Frameworks.

Dimension

A data element that is fundamental to data organization and providescontext to numeric items of data. A dimension consists of discrete valuesthat represent the keys of the data. Common examples are time, product,and location.

Dimension Build

An DecisionStream build process that delivers only dimension data.

Page 106: Tutorial Decision Stream Cognos

DecisionStream Tutorial Glossary 105

Dimensional Framework

A repository for reference structures (hierarchies and lookups) thatpromotes the reuse of these structures.

Domain

The set of members that exist in a dimension.

Domain Type

The domain of a dimension can be one of two types. It is the domain thatis used to deliver dimension data at the end of a build. The two types are:

Dynamic - the domain is build up from data sources as rows areprocessed.

Reference - the reference object associated with the dimension is taken asthe domain.

Drill

To move between the levels of a hierarchy by following parent-childlinks. Drilling down follows the link from parent to child. Drilling upfollows the link from child to parent.

Driver

A software module (a DLL in Windows) that provides support for acertain type of database access (for example, Oracle SQL*Net, ODBC).

Dynamic Members

Members of hierarchies or lookups that are defined by reference to tablesin database.

EBCDIC

The character set and method of encoding used on IBM machines.

Element

The set of a Build's dimensions, metrics, derivations, and attributes.

Engine

The DecisionStream component that actually carries out thetransformations.

Page 107: Tutorial Decision Stream Cognos

106 Glossary DecisionStream Tutorial

Environment

A value that indicates the execution circumstances of the DecisionStreamEngine and, therefore, provides information about the method ofconnection to source and target database.

Exception

A dimension that has a different aggregation method for a metric.

Filter

DecisionStream tests, against a set of filters, each data row that it passesto a delivery module. The test results establish whether DecisionStreamshould deliver the data row.

Foster Parent

An artificially introduced member that acts as a parent for members thateither have no defined parent or whose defined parent cannot be found atthe next highest hierarchy level.

Function

A routine that processes a set of parameters in order to derive a newvalue.

Hierarchy

A structure that holds related members organized into levels.

Hierarchy Explorer

An DecisionStream application that builds a hierarchy or lookup from itsstatically and dynamically defined members. It provides facilities toexplore the data of the hierarchy.

id

The value that uniquely identifies a member in data. For example, the idfor a product may be its product-code.

Key

The set of columns in a table that identify set of rows within the table.

Page 108: Tutorial Decision Stream Cognos

DecisionStream Tutorial Glossary 107

Level

Hierarchies are made up of levels with a level being used to hold a set ofmembers. Members at a level are related to the members at the next-highest level (their 'parents') and at the next-lowest level (their 'children').

Level Filter

A filter that is able to test whether a row of data has a certain combinationof levels and/or members.

Log File

A file that is used to redirect output from the Engine.

Lookup

A simple reference object that consists of members that are not arrangedinto hierarchical levels. You can consider a lookup to be a one-levelhierarchy.

Mapping

The relationship between columns (from an SQL query) and theDecisionStream objects to which they relate. DecisionStream hasmappings that relate data sources to build elements and level data selectsto dataset attributes.

Member

A node in a hierarchy.

Metadata

Data that describes the delivered data. Typically, metadata defines thedata structure and the domain of each dimension. It can also providealiases that reporting tools can use to provide meaningful descriptions.

Metadata Delivery

The delivery of metadata based on the domain of dimensions.

Metric

A value, frequently numeric, that holds a piece of information foranalysis. For example, units, revenue, cost, etc.

Model

A system that consists of fact data and metadata.

Page 109: Tutorial Decision Stream Cognos

108 Glossary DecisionStream Tutorial

Module

A delivery module, that is, a software module (in Windows, this is aDLL) that provides support for delivery of data and metadata to a varietyof target system types (for example, relational databases).

Multi-dimensional

Any system for which the dimension is the fundamental basis of dataorganization.

Multi-dimensional Aggregation

The process of taking data at one level of detail and simultaneouslysummarizing it across a number of dimensions.

Name

The identifier for an DecisionStream object. For example, a level.

Normalized data

Data that is structured to avoid data anomalies. Typically, operationaldata is normalized.

Notes

Optional, text-based information that can be saved with DecisionStreamobjects.

ODBC

A connectivity method that provides a common interface to a widevariety of database products.

OLAP

On-line analytical processing.

Output filter

A filter that can be specified in a delivery module to restrict delivery ofrows to the target system. The output filter takes any expression thatevaluates to TRUE or FALSE.

Output Level

A level of a hierarchy at which DecisionStream will output data. Outputdata may be generated by aggregation.

Page 110: Tutorial Decision Stream Cognos

DecisionStream Tutorial Glossary 109

Page

A unit of memory that DecisionStream uses to hold intermediate data.Under certain circumstances, DecisionStream may move pages of data todisk and retrieve them to main memory when next needed. This processis called 'paging'.

Parametric Interface

A human-computer interface, consisting of on-screen forms, where theuser enters values into pre-defined boxes.

Parent

The member on the next-highest level of a hierarchy that is related to themember under consideration.

Partitioned Delivery

Delivery of a data stream to a number of targets where the data stream isdivided (by defined criteria) between the targets.

Reference Attribute

Reference attributes on a hierarchy level collectively make up the dataset.Each level data select can have columns mapped onto dataset attributes.A reference attribute can have special significance, for example, when itrepresents the holder for the id of a hierarchy member. In this case it isexplicitly tagged as having special significance. Tags are available formember ids ($ID), captions ($CAPTION), and parents ($PARENT).

Reference Data

Semi-static data that is used to provide context for other data within arelational database. For example, a product master will contain a list ofproducts with which the company deals. The product master may alsocontain supporting information, such as product characteristics.

Referential Integrity

In a relational database, the posting of foreign keys represents therelationship between one table and another. Such a relationship exhibitsreferential integrity if the set of foreign key values is a subset of thereferenced primary key values. That is, there are no 'orphaned' foreignkeys.

Roll-up

To summarize data, creating summary records at a higher hierarchicallevel.

Page 111: Tutorial Decision Stream Cognos

110 Glossary DecisionStream Tutorial

Source

A data source. That is, somewhere from which the Engine or theDesigner can acquire data.

SQL

Structured Query Language. An almost universal query language thatcombines data definition with data manipulation.

SQL Helper

A link that allows you to use SQLTerm to produce and test SQL queries.

SQL Query

Any valid SQL statement in the dialect of the target database. This maybe either data definition (for example, CREATE TABLE) or datamanipulation (for example, SELECT).

SQLTerm

A terminal monitor application that provides a common interface to thevarious relational database products that DecisionStream supports.

SQLTXT

An implementation of SQL over text files.

Star Schema

See metadata schema.

Static Members

Members of hierarchies or lookups that are defined as part of thespecification, and not by reference to tables in a database.

Target

Any database or other system to which DecisionStream delivers data.

Transformation

The re-expression of a stream of data in some different format. Typicallythe merging and aggregation of source data to provide delivery elements.

Type

See data type.

Page 112: Tutorial Decision Stream Cognos

DecisionStream Tutorial Glossary 111

Unmatched Member

A member in a dimension that does not match with a member in theassociated hierarchy.

Page 113: Tutorial Decision Stream Cognos

112 Glossary DecisionStream Tutorial

Page 114: Tutorial Decision Stream Cognos

Index

Aadding a data source to builds, 78, 89aggregation, 66Aggregation Advisor, 13aggregation exception, 85anatomy (of a build), 73associating dimension with hierarchy, 68attributes, 44, 65

BBI Mart, 95Break/Sparsity Advisor, 13build elements, 76

creating, 79, 87Build Tree, 73Build Visualization pane, 13Build window, 12Build Wizard, 13, 60builds, 18, 59

adding a data source, 78adding inventory information, 85attributes, 65copying a table, 61data source, 62delivering data to a Cognos BI Mart, 95dimensions, 65duplicating, 78, 87, 93elements, 65executing, 63metrics, 65multiple data sources, 77partitioned delivery, 92simple build, 66templates, 61testing, 63

Ccatalog, 9catalogs

creating, 25changing the domain type, 89components, 9concepts, 15connecting

to reference database, 28, 30to sales database, 30to stock database, 30

connections, 16, 27Connections dialog box, 12constructing

fiscal hierarchy, 40location hierarchy, 53product hierarchy, 48

conventions, typographical, viicopying tables, 61creating

build elements, 79, 87catalog, 25data source, 23hierarchy levels, 41

Ddata

connecting to, 27examining, 38reference, 28transformation, 18

data delivery, 19data mart, 30data source, 16

adding to a build, 79adding to build, 89adding to builds, 78creating, 23mapping, 80, 90

databasesreference, 28, 30sales, 30stock, 30

DataSource (Microsoft OLAP Services), 101DataStream, 45, 75

Literals node, 45

Page 115: Tutorial Decision Stream Cognos

114 Index DecisionStream Tutorial

Mapping node, 45SQL node, 45

Date Hierarchy Wizard, 13decision support, 19delivering data, 19delivering data to Cognos BI Mart, 95delivery modules, 77derivations, 66

adding, 69dimension, 17Dimension Build Wizard, 13, 18dimension builds, 18Dimensional Framework, 17dimensions, 33, 65

associating with hierarchy, 68domain properties, 85modifying, 70modifying properties, 82

domainchanging type, 89dynamic, 86properties, 85reference, 87

duplicating builds, 78dynamic domain, 86

Eelements, 65

attributes, 65creating, 79derivations, 66dimensions, 65metrics, 65modifying dimension properties, 82

elements, build, 76examining the data, 38Examples Catalog, 25exception, aggregation, 85executing builds, 63execution log, 71exercises, practical, 21

Ffiscal hierarchy, 38fostering, 51

GGlossary, 107

Hhierarchies, 17, 35

associating with dimensions, 68attributes, 44caption attribute property, 57constructing fiscal, 40constructing location, 53constructing product, 48creating levels, 41dataset, 43fiscal, 38from multiple tables, 53from the columns of a table, 38from the rows of a table, 47id attribute property, 57levels, 43location, 53parent attribute property, 57product, 47static member, 52surrogate attribute property, 57viewing, 42, 50

Hierarchy Explorer, 42, 43, 50Hierarchy Wizard, 13

Iinterface, DecisionStream Designer, 11

Llevels, 43

adding to a hierarchy, 41attributes, 44

Literals node, 45location hierarchy, 53log files, 71

Mmapping

data source, 90data source to build elements, 80viewing, 81, 91

Mapping node, 45metadata, 19metrics, 65Microsoft OLAP Services, 100modifying dimension properties, 82

Page 116: Tutorial Decision Stream Cognos

DecisionStream Tutorial Index 115

OODBC data source

creating, 23ODBC driver, 22OLTP, 19operating systems, 10

Ppartitioned delivery, 92PowerPlay dimensions, 99practical exercises, 21procedures, 76product hierarchy, 47Properties dialog box, 12

Rreference data, 28reference database, 28, 30reference domain, 87Reference window, 12

Ssales database, 30saving data, 42, 50snowflake schema, 53split dimension, 94

SQL, 17SQL Helper, 80SQL node, 45SQLTerm, 12, 17, 38, 71star schema, 40stock database, 30storing data, 42, 50surrogate, 68

Ttable

copying, 61target data mart, 18templates, 61testing builds, 63toolbar, 12transforming data, 18typographical conventions, vii

Vviewing

delivered data, 71execution log, 71mappings, 81

Zzoom, 13

Page 117: Tutorial Decision Stream Cognos

116 Index DecisionStream Tutorial