tutorial.

Transcription

tutorial.
Tutorial
BETTER DECISIONS EVERY DAY™
<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>
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 Cognos
Incorporated. All rights are reserved. Reverse engineering of this software is
prohibited. No part of this software/documentation may be copied,
photocopied, reproduced, stored in a retrieval system, transmitted in any form
or by any means, or translated into another language without the prior written
consent 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 of
Cognos Incorporated in the United States and/or other countires. All other
names are trademarks or registered trademarks of their respective companies.
While every attempt has been made to ensure that the information in this
document is accurate and complete, some typographical errors or technical
inaccuracies may exist. Cognos does not accept responsibility for any kind of
loss resulting from the use of information contained in this document.
This page shows the publication date. The information contained in this
document is subject to change without notice. Any improvements or changes
to either the product or the document will be documented in subsequent
editions.
Contents
Preface
About this Tutorial.......................................................................... vii
Typographical Conventions................................................................. vii
Times .................................................................................................. viii
Chapter 1
Introducing DecisionStream ........................................................... 9
The Designer Interface ........................................................................ 11
Chapter 2
Concepts ......................................................................................... 15
DecisionStream Catalogs..................................................................... 15
Connections ......................................................................................... 16
Data Sources........................................................................................ 16
Dimensional Framework ..................................................................... 17
Builds................................................................................................... 18
Dimension Builds ................................................................................ 18
Data Transformation............................................................................ 18
Metadata .............................................................................................. 19
Data Delivery....................................................................................... 19
Chapter 3
Introducing the Tutorial Exercises ............................................... 21
Chapter 4
Creating the Catalog ...................................................................... 23
Creating the ODBC Data Source......................................................... 23
Creating the Catalog ............................................................................ 25
Chapter 5
Connecting to the Data .................................................................. 27
Connecting to the Reference Database ................................................ 28
Connecting to the Sales and Stock Databases...................................... 29
Creating a Data Mart Database............................................................ 29
Chapter 6
Dimensions and Hierarchies ......................................................... 31
Dimensions .......................................................................................... 31
Hierarchies........................................................................................... 33
Lookups ............................................................................................... 35
The Fiscal Hierarchy ........................................................................... 36
Examining the Data ...................................................................... 36
Constructing the Fiscal Hierarchy ................................................ 38
Viewing the Fiscal Hierarchy ....................................................... 39
Hierarchy Definitions ................................................................... 41
iv
Contents
DecisionStream Tutorial
Hierarchy Level Attributes ........................................................... 41
DataStream Structure.................................................................... 42
The Product Hierarchy......................................................................... 44
Constructing the Product Hierarchy ............................................. 45
Viewing the Product Hierarchy .................................................... 47
Fostering................................................................................ 47
The Location Hierarchy....................................................................... 49
Constructing the Location Hierarchy............................................ 49
Viewing the Location Hierarchy .................................................. 53
Summary.............................................................................................. 54
Chapter 7
Builds............................................................................................... 55
Copying a Table .................................................................................. 57
Creating the Build ........................................................................ 57
Testing the Build .......................................................................... 59
Aggregation and Derivation ................................................................ 61
About Build Elements .................................................................. 61
About this Build ........................................................................... 62
Creating the Build ........................................................................ 62
Executing the Build ...................................................................... 66
Viewing the Execution Log.......................................................... 66
Viewing the Delivered Data ......................................................... 67
Anatomy of a Build ...................................................................... 69
The Build Tree ...................................................................... 69
DataStreams .......................................................................... 70
Build Elements ...................................................................... 71
Procedures ............................................................................. 72
Delivery Modules.................................................................. 72
Multiple Data Sources ......................................................................... 73
Duplicating an Existing Build ...................................................... 73
Adding a Data Source................................................................... 74
Creating Build Elements ....................................................... 74
Adding the New Data Source................................................ 75
Viewing the New Mappings.................................................. 76
Modifying the Properties of the period_no Dimension ......... 77
Testing the Build ................................................................... 79
Adding Inventory Information............................................................. 80
Aggregation Exceptions ............................................................... 80
Dimension Domain Properties ..................................................... 80
Dynamic Domain .................................................................. 81
Reference Domain................................................................. 81
Creating the Build ........................................................................ 82
Creating a Duplicate Build .................................................... 82
Creating New Build Elements ............................................... 82
Changing the Domain Type of Element period_no............... 84
Adding the New Data Source................................................ 84
Viewing the New Mappings.................................................. 86
Partitioned Delivery............................................................................. 87
DecisionStream Tutorial
Contents
Creating a Duplicate Build ........................................................... 88
Adding the Delivery Modules ...................................................... 88
Delivering Data to a Cognos BI Mart.................................................. 90
Viewing the Results...................................................................... 92
PowerPlay Dimensions................................................................. 94
Delivering Data to Microsoft OLAP Services ..................................... 95
Viewing the Results.................................................................... 100
Glossary ........................................................................................ 101
Index .............................................................................................. 113
v
vi
Contents
DecisionStream Tutorial
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 introduction
to DecisionStream and follows with the basic concepts that you must
understand to work with this product.
Practical exercises follow the basic concepts. While working through the
exercises, you will connect DecisionStream to source data, establish the
dimensionality of that data, define multi-dimensional aggregation, and deliver
the aggregated data to a data mart. You will also create builds that deliver
data in a format suitable for specific analysis tools, for example, Cognos
PowerPlay and Impromptu.
The final section of this tutorial is a glossary that defines technical terms that
you encounter when working with DecisionStream.
This tutorial does not describe the advanced features of DecisionStream. For
full information on using the DecisionStream Designer, please refer to the
DecisionStream User’s Guide. In addition to using the Designer, the
DecisionStream components can be run from the command line and
specifications defined manually. For more information please refer to the
Language and Command Line Interface (CLI) Guide.
For information on installing DecisionStream, please refer to the Installation
Guide.
Typographical Conventions
This tutorial uses these typographical conventions:
Convention…
Used for…
Bold
Windows, menus, menu items, buttons, and other
on-screen objects are shown in bold. For example,
the Reference window.
SMALL BOLD CAPITALS
Keys on the computer keyboard, for example CTRL
or DELETE.
viii
About this Tutorial
DecisionStream Tutorial
Monospace Font
Text that you type at the keyboard. For example,
‘Into the Name box, type Examples Datamart’.
A note containing additional information.
Times
For your guidance, this list gives an estimate of the time required to complete
the tutorial. These times are rough estimates only and may vary considerably
from the times that you actually take to complete the sections.
§
§
The Concepts chapter should take approximately half an hour to
complete.
The Practical Exercises should take 3 to 4½ hours to complete.
Because each exercise builds on its predecessors, you must complete
the exercises in the order in which this tutorial presents them.
Chapter 1
Introducing DecisionStream
DecisionStream is a powerful Extract Transform and Load (ETL) product that
can extract transaction data and transform it to deliver best practice
dimensional data mart solutions. Enterprises can deliver business intelligence
applications as a whole, from the transformations and loading of data marts, to
the deployment of business models and reports, with consistency from end to
end.
The main DecisionStream unit is the build. Each build is a specification of the
data that DecisionStream extracts, the transformation of that data, and the
targets 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 can
deploy for execution on any platform that the DecisionStream Engine
supports. DecisionStream uses an innovative dimensional reference model
(the Dimensional Framework) to enable the management of data marts of all
shapes and sizes and across many different platforms. It uses the Dimensional
Framework to enable massive-scale data aggregation in a fraction of the time
possible with hand-made solutions or with SQL-based data warehouse
loaders.
The Dimensional Framework is a multi-dimensional model of the data
warehouse. DecisionStream can use this to populate many OLAP targets and
can do this inexpensively in comparison to hand-coding or SQL-based tools.
DecisionStream catalogs are central repositories for DecisionStream
configuration details. In its catalogs, DecisionStream Designer stores:
§
§
§
Specifications of connections to source and target databases
The Dimensional Framework
DecisionStream builds.
10
Introducing DecisionStream
DecisionStream Tutorial
This approach enables you to initially define database connections and the
Dimensional Framework, and then reuse this information for a large number
of builds.
DecisionStream supports these platforms:
Component
Supported Platforms
DecisionStream Designer
Windows NT 4 (with service pack 2)
Windows 95 and 98
DecisionStream Engine
Windows
Windows NT 4 (SP2)
Windows 95
Windows 98
UNIX – including:
HP-UX 10.20 or above
Sun Solaris SPARC 2.5.1 or above
IBM AIX 4.2 or above
Compaq 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 a
logical, multi-dimensional model of the target data mart, creating a specific
routine to aggregate data for this model in a single pass. The DecisionStream
engine does not rely on SQL-style aggregation techniques. The time that an
SQL-based tool takes to perform aggregation increases exponentially with the
number of dimensions. With DecisionStream, the increase is linear which
means that DecisionStream can deliver data extremely quickly.
DecisionStream can partition the delivered data both horizontally and
vertically. It can even deliver partitions to different targets and different
formats. The target data mart need not exist prior to data delivery. If
required, DecisionStream creates the data structure before populating it.
DecisionStream includes a wide range of aggregation functions that support
many different types of OLAP analysis. It supports selective aggregation so
that you can reduce processing time and storage requirements by omitting
unwanted aggregation on dimensional intersections.
DecisionStream can create and maintain its rules and definitions in any data
source to which it can connect.
DecisionStream provides wizards to simplify creating hierarchies and builds.
However, you can create DecisionStream hierarchies and builds entirely by
hand. You can also edit, by hand, hierarchies and builds that you created
using the wizards.
DecisionStream Tutorial
Introducing DecisionStream
11
The Designer Interface
The DecisionStream Designer has two windows: the Build window and the
Reference window. In the Reference window, you define the hierarchies and
lookups that make up the Dimensional Framework. In the Build window, you
define DecisionStream builds.
The Build and Reference windows represent the builds and reference
structures in tree format. You can expand or collapse any node of the Build
and Reference Data trees by clicking the plus or minus icon to its left. Most
nodes have associated properties dialog boxes. In these dialog boxes, you can
modify the properties of the object that the node represents.
To open a Properties dialog box, select the node for the object and then do
one of:
§
§
§
Click Properties editor on the toolbar
Right-click the node and then choose Properties from the shortcut
menu
Press F4.
12
Introducing DecisionStream
DecisionStream Tutorial
You define database connections in the Connections dialog box.
Connections dialog box
To open this dialog box, click Edit connection definitions on the
toolbar.
The toolbar provides quick access to the main components of the
DecisionStream Designer. The following table gives a brief description of
each toolbar button:
Create a new catalog
Opens the New Catalog dialog box where you
can create a catalog.
Open an existing
catalog
Opens the Open Catalog dialog box where you
can select the catalog with which to work.
Save current catalog
Saves all the changes that you have made to the
current catalog.
Edit build definitions
Switches to the Build window.
Edit reference
definitions
Switches to the Reference window.
Edit connection
definitions
Switches to the Connections dialog box.
Execute the current
build
Executes the current build using the default
settings.
Properties editor
Opens the Properties dialog box for the selected
item in the build or reference tree.
Run SQLTerm tool
Starts SQLTerm. This enables you to run SQL
statements against any data source accessible to
DecisionStream.
DecisionStream Tutorial
Introducing DecisionStream
Run Build Wizard
Guides you through the creation of a build that
takes input data from one or more tables and
delivers fact data and/or dimension data to selected
target databases.
Run Dimension Build
Wizard
Guides you through the creation of a dimension
build to implement a star or snowflake schema.
Run Hierarchy
Wizard
Guides you through the creation of a hierarchy.
Run Date Hierarchy
Wizard
Guides you through the creation of a date
hierarchy.
Run break/sparsity
advisor
Assists you when deciding on which dimensions to
break, and also when ascertaining sparsity.
Run aggregation
advisor
Analyzes the output levels of all the hierarchies
associated with a build and shows graphically how
different level combinations within the delivered
data may be generated from stored data.
Show Build
Visualization
Reveals (or hides) the Build Visualization pane.
Zoom in
Enlarges the size of the objects in the Build
Visualization pane.
Zoom out
Reduces the size of the objects in the Build
Visualization pane.
Refresh Build
Visualization
Restores objects in the Build Visualization pane
to their original size.
Copy overview to
clipboard
Copies the contents of the Build Visualization
pane to the clipboard, from where you can paste it
into another application.
The Zoom in, Zoom out, Refresh Build Visualization, and Copy overview
to clipboard buttons are only available when the Build Visualization pane
is displayed.
13
14
Introducing DecisionStream
DecisionStream Tutorial
Chapter 2
Concepts
Before starting the Practical Exercises, you should understand the concepts
and 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 Catalogs
Each DecisionStream catalog provides a central repository for the information
that 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 a
database that is used for other purposes (for example, a target data mart).
16
Concepts
DecisionStream Tutorial
In the DecisionStream Designer, the Build window shows the builds and
dimension builds of the catalog; the Reference window shows the reference
structures (the hierarchies and lookups) of the Dimensional Framework.
Connections
Each connection provides the information that enables DecisionStream to
connect to a database. A connection:
§
§
§
Identifies the particular database.
Specifies the connection method that DecisionStream must use to
connect 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 from
the source and target databases. Notwithstanding differences in SQL dialect,
they enable you to change, with minimal impact, the physical database to
which a connection relates. For example, the connections mechanism enables
you to develop builds on one computer and deploy those builds on another.
Data Sources
DecisionStream can extract data from a variety of sources. In addition to
normalized, operational data, it can extract data from de-normalized data
marts and even from delimited text files. Where the source data contains
hierarchical information, you can configure DecisionStream to only accept
data 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) that
allows DecisionStream to connect to delimited text (ASCII or EBCDIC) data
sources. Thus, DecisionStream can connect to many databases or applications
which support delimited text exports.
You configure DecisionStream to interact with these sources by creating
connections. Each connection establishes the database object and connection
method that DecisionStream uses. Overall, having created the appropriate
connections, you treat all data sources in an identical manner. However, you
should always interact with each data source using its own dialect of SQL.
DecisionStream Tutorial
Concepts
17
Examples of this are when using SQLTerm and when fine-tuning SQL
statements.
Dimensional Framework
DecisionStream achieves most of its power and flexibility by use of an
innovative dimensional reference model (called the Dimensional Framework).
It uses this to enable massive-scale aggregation in a single pass and in a
fraction of the time that other tools require.
The dimensions of business data represent the core components of a business
which are categorized for analysis.
Within its catalogs, DecisionStream uses hierarchies to define business
dimensions. The Dimensional Framework consists of multiple hierarchies
that represent the structure of the data independently of any source database.
DecisionStream allows unlimited hierarchies, and thus unlimited
dimensionality.
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 of
allowable values (the dataset of the dimension). Where they exist,
you can use these tables to define DecisionStream hierarchies, and
hence data dimensions. This approach generally has the advantage
that DecisionStream need interrogate a smaller quantity of data to
obtain the appropriate domain.
From the fact data itself. Use this where no reference tables exist, or
where you cannot guarantee referential integrity between the
reference tables and the fact data.
From static elements. DecisionStream supports static hierarchies.
That is, you define each hierarchical level and every member of the
hierarchy by hand.
For even greater flexibility, you can combine these methods within a single
hierarchy. The DecisionStream Hierarchy Wizard simplifies the definition
process for most hierarchies. You can also create complex hierarchy
definitions by hand, or hand-modify definitions that the Hierarchy Wizard
creates. Thus, DecisionStream provides both flexibility and ease of use.
18
Concepts
DecisionStream Tutorial
Builds
Each DecisionStream build is a complete specification for the extraction of
data, transformation of that data, and delivery of that data to the target data
marts. Builds that perform aggregation do so along dimensions that the
Dimensional Framework defines. Each build can acquire data from many data
sources; 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 the
builds that the Build Wizard creates, or create builds entirely by hand.
Dimension Builds
Each dimension build acquires data from the hierarchy or lookup that you
specify and delivers it to the target data mart. You can choose to deliver the
dimension 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. You
can also hand-modify the dimension builds that the Dimension Build Wizard
creates, or create dimension builds entirely by hand.
Data Transformation
DecisionStream builds can acquire data from multiple data sources. In many
cases, the data will have different naming and storage formats. For example,
dates may be stored as Julian dates, as strings in American format, or as
strings 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. For
example, no matter how each operational system may store dates, all dates
must exist in the data warehouse in the same format.
DecisionStream enables powerful transformations through derivation features
which can be used to provide data consistency.
DecisionStream Tutorial
Concepts
Metadata
Metadata is data about data. It defines the structure and, to some extent, the
semantics of the fact data. Without metadata, the content of your data
warehouse is meaningless. Metadata is instrumental in transforming raw data
into information.
In an operational environment, metadata provides information for software
developers and database administrators. End users typically interact with
operational databases via on-line transaction processing (OLTP) systems.
These users do not need to know the structure of the data. They interact with
an OLTP system via on-screen forms that give all the context information that
they need.
This is not the case in a decision support environment. Here, data analysts
and executives search for useful facts that are often unrecognizable until
found. These users have chiefly ad-hoc demands on the data and it would be
impossible to provide them with a parametric interface. Metadata provides
the context to help meet these users needs. It defines the underlying structure
of the data; allowing reporting tools to rapidly process user requests. It also
provides aliases; allowing reporting tools to caption the data more
meaningfully.
Data Delivery
Frequently, reporting of analysis data must be available at different levels of
granularity, that is, summarized at different hierarchical levels. Normally, the
highest levels of summarization receive the highest levels of usage.
Therefore, pre-calculating the higher levels has a significant benefit to
reporting tool performance.
Security considerations may dictate that different data columns reside at
different locations. For example, a company may wish to maintain personal
information apart from account information.
DecisionStream can deliver three types of data:
§
§
§
Fact data — facts, or values. For example, the number of products
and 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 and
dimension data.
19
20
Concepts
DecisionStream Tutorial
DecisionStream can deliver the results of a single build into a single table, or
partition it by criteria that you choose. It can partition the delivered data
horizontally, vertically or in a combination of the two. It can simultaneously
deliver different partitions to different targets, even at different physical
locations.
Chapter 3
Introducing the Tutorial
Exercises
The practical exercises in the following chapters give you an opportunity to
work with DecisionStream Designer. You will configure DecisionStream to
acquire data from multiple data sources, transform the data, and deliver it
(with metadata) to various targets.
Each exercise continues from its predecessors. Therefore, you should
undertake 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 store
the results of the exercises.
5
Establish the dimensionality of the data by creating these hierarchies:
§
§
§
6
A fiscal hierarchy
A hierarchy of products and product classes
A hierarchy of geographical locations.
Starting with a simple table copy, produce progressively more-complex
builds. You will create builds to:
§
§
Copy a table from one database to another
Produce summary and derived data from a single table
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 Access
ODBC driver:
1
On the Windows Start menu, point to Settings and then choose Control
Panel.
2
In the Control Panel, look for the ODBC or ODBC32 icon. It this is not
present, then your computer does not have ODBC.
3
Double-click the ODBC or ODBC32 icon. The ODBC Data Source
Administrator opens.
4
In the Drivers tab, look for an entry, ‘Microsoft Access Driver (*.mdb)’
or similar. If this entry is not present, then your computer does not have
the 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 you
install DecisionStream. You must have also install the corresponding ODBC
data 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. You
recreate the Tutorial Catalog as you work through the examples. Therefore,
you can check your work by opening the Tutorial Catalog and examining its
contents.
Chapter 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 which
DecisionStream can connect.
Creating the ODBC Data Source
In this exercise, you create an ODBC data source and base this upon a new
Microsoft Access database.
You must create the required ODBC data source before you can create the
catalog.
To create the ODBC data source in which to store the Examples Catalog:
1
If it is not running, start DecisionStream Designer. In the Open Catalog
dialog box, click Cancel.
2
From the Tools menu, choose ODBC Administrator. The ODBC Data
Source Administrator opens.
24
Creating the Catalog
3
DecisionStream Tutorial
Display the System DSN tab and then click Add. Select the Microsoft
Access Driver and then click Finish. The Microsoft Access Setup dialog
box opens:
Typical ODBC Microsoft Access Setup dialog box
4
Into the Data Source Name box type Examples Catalog. Optionally,
type a description into the Description box.
5
Click Create. The New Database dialog box opens. Enter the name for
the new database, and select the directory where it is to be stored. For
example, the full path might be C:\DS_Tutorial\ExampleCat.mdb).
Click OK.
The directory, in which you create the database, must already exist. If
necessary, you should create this directory prior to creating the database.
6
Click OK in both the confirmation message box and the ODBC
Microsoft Access Setup dialog box.
7
Click OK to close the ODBC Data Source Administrator. This
completes creating the ODBC data source.
DecisionStream Tutorial
Creating the Catalog
25
Creating the Catalog
A DecisionStream catalog consists of a number of special data tables in
which DecisionStream records the configuration of connections, builds, and
reference structures.
Having established a suitable ODBC data source, you are ready to create the
Examples Catalog.
To create the Examples Catalog:
1
On the toolbar click Create a new catalog. The New Catalog wizard
opens:
2
Into the Name box, type ExamplesCatalog. Into the Caption box, type
Examples Catalog. Optionally, type some text into the Notes box.
Click Next.
26
Creating the Catalog
DecisionStream Tutorial
The left pane of the dialog box shows the connection methods that are
available on your computer. The Data Source Name list on the right side of
the dialog box lists the data sources to which you can connect by using the
selected connection method.
3
Select ODBC from the connection types in the left pane. From the Data
Source Name list, choose Examples Catalog. You can confirm that the
connection is valid by clicking Test Connection.
4
Click Finish. DecisionStream creates the tables for the catalog and then
opens the catalog.
Chapter 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 source
names. These provide connections to three Microsoft Access databases that
the DecisionStream Installer places in the folder
C:\ProgramFiles\DecisionStream\Tutorial\MSAccess\ by default.
This data models a retail company that has a many outlets that offer many
products for sales.
If the data sources do not appear within the ODBC Data Source Names
lists, then please reinstall DecisionStream Designer, ensuring that you elect
to install the tutorial databases and the ODBC data source names.
This table lists the data source names and gives a brief description of their
contents:
Data Source Name
Contents
DS Tutorial Reference
Reference (or ‘master’) tables for the fiscal
range, range of locations, and product range.
DS Tutorial Sales
Sales and revenue data for each product, in
each state, and during each fiscal period.
DS Tutorial Stock
Data that describes the stock levels of each
product for each state and fiscal quarter.
In the following sections, you establish connections to the tutorial Reference,
Sales, and Stock databases.
28
Connecting to the Data
DecisionStream Tutorial
Connecting to the Reference
Database
To connect to the Reference database:
1
On the toolbar, click the Edit connection definitions button. The
Connections dialog box opens.
The Connections dialog box
2
In the Connections dialog box, click New. The Connection Properties
dialog box opens.
3
In the General tab, type Tutorial Reference into the Alias box.
Display the Connection Details tab.
Properties for connection ‘Tutorial Reference’ (Connection Details tab shown)
DecisionStream Tutorial
Connecting to the Data
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 your
computer to enable you to design builds for deployment on a computer that
has the required connection method.
4
In the left pane, select ODBC, and from the Data Source Name list,
select DS Tutorial Reference.
5
Test the connection by clicking Test Connection. The system should
respond with a message, ‘Connection OK’. Close the message box by
clicking OK.
6
Click OK again to close the Connection Properties dialog box.
7
The new connection, Tutorial Reference, appears in the Connections
dialog box.
Connecting to the Sales and Stock
Databases
In a similar manner to the previous exercise, create connections to the Sales
and Stock databases:
§
§
Create a connection named ‘Tutorial Sales’ that uses ODBC to
connect to the data source named ‘DS Tutorial Sales’.
Create a connection named ‘Tutorial Stock’ that uses ODBC to
connect to the data source named ‘DS Tutorial Stock’.
When you have done this click Close to close the Connections dialog box.
Creating a Data Mart Database
DecisionStream requires somewhere to which it can deliver the results of the
example exercises. For this purpose, you should create a target database
which will be used to house the data marts.
29
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 an
ODBC data source named ‘Examples Datamart’. You can create the
Microsoft 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 that
you have just created.
The Connections dialog box should look like this:
Chapter 6
Dimensions and Hierarchies
In this chapter, you establish the dimensionality of the sample data and create
hierarchies that model this.
Dimensions
The 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 managers
exist at the corporate headquarters.
The company has a fiscal year that is divided into quarters. Each
quarter has three periods of one calendar month.
This company will want to view its data by geographical division, by product
category, 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 this
company, this how many units of a product were sold at one location in one
month, for example, how many widgets were sold in Montana during July.
32
Dimensions and Hierarchies
DecisionStream Tutorial
You can roll-up the data along one or more dimensions to derive summary
information. For example, you can roll-up the data along the Location
dimension to derive a value for the number of units or widgets sold in all
locations 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
DecisionStream Tutorial
Dimensions and Hierarchies
exist, you can use these tables to define DecisionStream hierarchies, and
hence data dimensions.
Hierarchies
The Tutorial Reference database contains four reference tables. These define
the fiscal, geographical location, and product-range dimensions. From these
reference tables you can create DecisionStream hierarchies to model data
dimensions. Within DecisionStream, each hierarchy represents a single
dimension. DecisionStream uses hierarchy information when aggregating
data, calculating derived values, and more. You should create one hierarchy
for 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 which
year, quarter and period it relates. You can see this graphically in
this illustration:
33
34
Dimensions and Hierarchies
§
DecisionStream Tutorial
Based upon relationships between rows of the same table. In
relational terms, these are recursive relationships. An example of
this is the Product hierarchy. The source table, ds_product, includes
these columns:
−
product_cd
−
parent_product_cd
Within the parent_product_cd column, each row refers to the
product_cd value of its parent. You can see this graphically in this
illustration:
§
Based upon relationships between multiple data tables. The
hierarchy follows one-to-many relationships between the tables. An
example of this is the Location hierarchy. Two tables, ds_timezone
and ds_location, contribute to this hierarchy. Each row in
ds_location refers to a row in ds_timezone. You can see this
graphically in this illustration:
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 hierarchies
based upon columns or rows of a single data table, or upon multiple data
tables. It also has a wizard with which you can create date hierarchies.
You create, view, and modify hierarchies in the Reference window. When
DecisionStream starts, this window is minimized at the bottom of the
DecisionStream application window.
The Reference window for the Tutorial Catalog
For added flexibility, you can combine two or more hierarchy types within the
same hierarchy. For example, you can create a static top-level, create the next
two levels from the rows of a single table, and create the lower hierarchy
levels from multiple tables. However, you must define such complex
hierarchies by hand. For further information on defining hierarchies, please
refer to the User’s Guide.
Lookups
DecisionStream uses reference structures to provide context for fact data. It
supports two types of reference structure:
§
§
Hierarchies – with members organized into multiple levels. Each
member is related to members of the level above (its parents) and to
the level below (its children). The preceding section describes these
structures.
Lookups – single-level structures that you can consider as singlelevel hierarchies.
36
Dimensions and Hierarchies
DecisionStream Tutorial
Apart from the number of levels that each can contain, hierarchies and
lookups are similar structures with which you interact in a similar manner.
Thus, this tutorial concentrates on hierarchies and you should refer to the
User’s Guide for more information on lookups.
The Fiscal Hierarchy
This hierarchy represents the fiscal periods of the company.
Examining the Data
DecisionStream provides SQLTerm (and SQL Helper when you are defining
SQL for a data source) to enable you to examine database data, or to assist
you when constructing SQL statements.
When you want to enter an SQL statement, you can construct it yourself, you
can use SQLTerm to help you, or you can combine the two methods by using
SQLTerm to construct the statement and then refine it yourself.
To examine the data:
1
Start SQLTerm by clicking the Run SQLTerm tool button on the
toolbar. SQLTerm opens.
SQLTerm
DecisionStream Tutorial
Dimensions and Hierarchies
37
The window consists of a toolbar and three panes. The Database Objects
pane displays a ‘tree view’ of the current database through which you can
browse. The SQL statement is shown in the SQL Query pane, and when the
statement 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 statement
is a SELECT).
Interrupt current
processing
Interrupts processing.
List box
Enables you to select the connection with
which you want to work.
2
From the list box on the SQLTerm toolbar, select Tutorial Reference. In
the Database Objects pane, double-click Tutorial Reference to expand
this node.
3
Select the ds_fiscal table, hold down CTRL, drag the table to the SQL
Query pane and drop it. SQLTerm generates an SQL statement that
returns the entire ds_fiscal table.
4
Click Execute SQL Query on the toolbar. SQLTerm retrieves the
fiscal data and shows it in its Results pane.
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 fiscal
quarter, and the fiscal period to which it relates. Since each data row contains
all the hierarchy levels, this is a hierarchy based upon the columns of the same
data row.
38
Dimensions and Hierarchies
DecisionStream Tutorial
Constructing the Fiscal Hierarchy
To construct this hierarchy:
1
Click Run hierarchy wizard on the toolbar. The Hierarchy Wizard
opens.
2
Select Create the hierarchy from the columns of one table (Star
Schema) 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. Expand
the Tutorial Reference node by clicking the plus to it’s left. Select the
ds_fiscal table. The right pane shows the columns of this table. The
Hierarchy Wizard should look like this:
Click Next.
5
Most companies do not aggregate data over more than a fiscal year. To
model this, ensure that the Include a top level with an ‘All’ member
check 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 Select
Column dialog box opens. In this dialog box, select fiscal_yr, and
then click OK.
In a similar manner, enter fiscal_yr_desc into the Source column
for caption box.
DecisionStream Tutorial
Dimensions and Hierarchies
7
Click OK.
8
In a manner similar to steps 6 and 7, create two further hierarchy levels
named ‘Quarter’ and ‘Period’. To do this:
a. Select the level Year and click the Create a new level button.
b.
c.
d.
In the Level Details dialog box, type Quarter into the Name box,
choose fiscal_qtr and fiscal_qtr_desc as the name and caption
respectively, and then click OK.
Select the new level Quarter and click the Create a new level
button.
In the Level Details dialog box, type Period into the Name box,
choose period_no and period_no_desc as the name and caption
respectively, and then click OK.
The hierarchy should look like this:
9
Click Finish to close the wizard.
10 Finally, store the hierarchy definition by clicking Save Current
Catalog on the toolbar.
Viewing the Fiscal Hierarchy
To view the new hierarchy:
1
In the Reference window, select the Fiscal hierarchy and choose
Hierarchy Explorer from the Reference menu.
2
Check that Fiscal (H) is selected in the Reference Item list and click
OK.
3
The Fiscal hierarchy opens in the Hierarchy Explorer.
39
40
Dimensions and Hierarchies
DecisionStream Tutorial
Hierarchy ‘Fiscal’ in the Hierarchy Explorer
In the Elements pane, you can expand and collapse each element by clicking
the plus or minus to its left. When you select an element, its details show in
the Attributes pane. These include the level at which the element resides, the
number of parents and children that the element has, and a value for each
dataset attribute of the hierarchy level.
You can change the way that the Hierarchy Explorer arranges the
Elements pane by clicking Elements at Each Level and Hierarchical
Relationships on the toolbar.
Each node has a composite label. This consists of the caption of the member
followed by its identifier in parentheses. For example, Jan-96 (199601).
The right pane of the Hierarchy Explorer contains detailed information
about the currently selected node.
Properties for member ‘199607’
This includes the level at which the member resides, the number of parents
and children, and the value of each attribute.
DecisionStream Tutorial
Dimensions and Hierarchies
Hierarchy Definitions
In DecisionStream, each hierarchy consists of a number of hierarchy levels.
Each level of the hierarchy contains a set of members (the dataset of the
level). The dataset of each level contains static and dynamic members. You
create static members within the definition of the hierarchy. They do not
depend on reference data and, as their name suggests, they do not change to
reflect the contents of the reference data tables. DecisionStream applies an
SQL statement to acquire dynamic members from the reference data tables.
Thus, the set of dynamic members changes to reflect the contents of these
tables.
Each hierarchy member can relate to members from the level above (its
parents) and to members from the level below (its children). DecisionStream
constructs the hierarchy according to these relationships. To understand this
mechanism, you should examine the hierarchy that you have created:
Display the Reference window by clicking Edit reference definitions on
the toolbar.
Fully expand the Fiscal hierarchy. It should look like this:
The hierarchy has a DataStream and three levels: Year, Quarter, and Period.
Each level has a set of static members and a DataStream. DecisionStream
uses DataStreams to gather data sources to present a single stream of data to
other DecisionStream objects.
Hierarchy Level Attributes
Select the Quarter level and click Properties editor on the toolbar. In the
Level Properties dialog box, display the Attributes tab.
41
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 data
row.
‘C’ indicates that the attribute provides the descriptive caption for
each data row.
‘P’ indicates that the attribute provides the link to the next highest
level of the hierarchy (to the parent of the member).
‘S’ indicates that the attribute provides the surrogate key for each
data row. Please refer to the User’s Guide for further information.
The Parent property is particularly significant. DecisionStream constructs the
hierarchy by using the value of the Parent property to link each member to the
level above. To understand from where DecisionStream obtains the values of
the attributes, you should refer to the DataStream of the hierarchy.
DataStream Structure
Expand 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 the
hierarchy
A Literals node — specifies literal values (if any) for the hierarchy
DecisionStream Tutorial
Dimensions and Hierarchies
§
A Mapping node — specifies the mapping between the DataStream
items and the columns of the source data.
Select the SQL node and click Properties editor on the toolbar.
SQL specification for the Fiscal hierarchy
In the Data Source SQL dialog box, note that the SQL specification returns a
number of data columns. Close this dialog box.
Select the Mapping node and click Properties editor on the toolbar. The
Data Source Mapping dialog box opens:
Mappings for the Fiscal hierarchy
43
44
Dimensions and Hierarchies
DecisionStream Tutorial
This shows how the source columns (marked ) and literals (marked ) map
onto the DataStream items (marked ). In this case, the DataStream provides
data for the whole hierarchy. Because the DataStream provides data for more
than one level, DecisionStream qualifies each DataStream item by preceding it
with the appropriate level name. Note that a column can map to more than
one DataStream item. For example, this would happen if you wanted to use
the same source data column to provide both the identifier and the caption.
DecisionStream maps each DataStream item to the level and attribute that has
the same name, thus completing the mapping between the source data and the
attributes of each hierarchy level.
DecisionStream populates the hierarchy from the data sources. It uses the
mapping specification to map the source columns onto the attributes and
determines the parent of each member from the value of the Parent property.
The Product Hierarchy
This hierarchy represents the product range of the company. The data looks
like 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
DecisionStream Tutorial
Dimensions and Hierarchies
45
You can examine this data in SQLTerm by in a manner similar to the
instructions in Examining the Data on page 36. You should control-drag the
ds_product table to the SQL Query pane of SQLTerm.
Each data row defines the entry as either a product or a product class. Where
the entry is a product, with one exception, it contains a reference to its product
class. That is, for products, the parent_product_cd column references the
product_cd value of the product class (for example, Tennis balls have a
parent_product_cd value of 3, indicating that they belong in the Sporting
Goods product class). This is a hierarchy based upon the relationship between
rows 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. You
can see the results of this when you explore the generated hierarchy.
Constructing the Product Hierarchy
To construct this hierarchy:
1
Click Run hierarchy wizard on the toolbar. The Hierarchy Wizard
opens.
2
Select Create the hierarchy from the rows of one table and then click
Next.
3
Into the Name box, type Product. Optionally, type a caption and notes.
Click Next.
4
The wizard displays the available connections in the left pane. Expand
the Tutorial Reference node by clicking the plus to it’s left. Select the
ds_product table. The right pane shows the columns of this table. The
Hierarchy Wizard should look like this:
46
Dimensions and Hierarchies
DecisionStream Tutorial
Click Next.
5
You must now identify the source columns for the hierarchy:
§
§
Click the button next to the Column for Id. The Select Column
dialog box opens. In this dialog box, select product_cd, and then
click OK.
In a similar manner enter parent_product_cd into the Column for
Parent box, product_name into the Column for Caption box, and
product_type into the Column 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 product
range. This requires a top-level ‘ALL’ member of the hierarchy. To
achieve this, select Include a top level with an ‘ALL’ member, and
click 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 clicking Save Current
Catalog on the toolbar.
DecisionStream Tutorial
Dimensions and Hierarchies
47
Viewing the Product Hierarchy
To view the hierarchy:
1
In the Reference window, select the Product hierarchy and choose
Hierarchy Explorer from the Reference menu.
2
Check that Product (H) is selected in the Reference Item list and click
OK.
3
The Product hierarchy opens in the Hierarchy Explorer:
Hierarchy ‘Product’ in the Hierarchy Explorer
Expand the nodes in the Elements pane and examine the generated hierarchy.
The hierarchy contains the top-level ‘ALL’ member that you specified in step
6. 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 have
no explicit product class. Beneath this member, DecisionStream has placed
the member (Dictionary (L01)) that does not relate to any class. This is the
DecisionStream fostering mechanism in action.
To understand the DecisionStream fostering mechanism, you must inspect the
properties of the hierarchy.
48
Dimensions and Hierarchies
DecisionStream Tutorial
To examine the hierarchy’s properties:
1
Display the Reference window by clicking Edit reference definitions
on the toolbar.
2
Fully expand the Product hierarchy. It should look like this:
3
Select the Class level
4
Click Properties editor on the toolbar. Display the Attributes 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 the Static Members node in the AllProduct level.
DecisionStream Tutorial
6
Dimensions and Hierarchies
Click Properties editor on the toolbar. The Static Members dialog
box opens.
Static members for level ‘AllProduct’
Note that the Foster column is selected for the member ALL. This tells
DecisionStream that the static member is the parent for all members of the
next-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 no
explicit parent (for example, Dictionary).
The Location Hierarchy
This hierarchy represents the geographical locations of the company. The
data resides in two related tables (ds_location and ds_timezone), where
ds_location.timezone_cd references ds_timezone.timezone_cd. You can
examine the data in SQLTerm.
Constructing the Location Hierarchy
This is a hierarchy based upon multiple, related tables.
To construct this hierarchy:
1
Click Run hierarchy wizard on the toolbar. The Hierarchy Wizard
opens.
2
Select Create the hierarchy from multiple tables (Snowflake Schema)
and then click Next.
49
50
Dimensions and Hierarchies
DecisionStream Tutorial
3
Into the Name box, type Location. Optionally, type a caption and
notes. Click Next.
4
Assume that the company wants to summarize its data for all
geographical areas. This requires a top-level ‘ALL’ member of the
hierarchy. To achieve this, select Include a top level with an ‘ALL’
member, and click Next (thus accepting default values).
5
Create the Timezone level. To do this, select the AllLocation node and
click the Create a new level button. In the dialog box that opens:
§
§
§
§
§
§
Into the Name box, type Timezone.
From the Source Database list, select Tutorial Reference.
Click the button next to the Source Table box. The Select Table
dialog box opens. Select the ds_timezone database and click OK.
Click the button next to the Source column for Id box. The Select
Column dialog box opens. Select the timezone_cd column and
click OK.
In a similar manner, enter timezone_name into the Source column
for Caption box.
From the Source column for Parent list, select (link to foster).
This specifies that members of the Timezone level have no explicit
parent and that DecisionStream should attach them to the ‘ALL’
member that you created in step 4.
DecisionStream Tutorial
Dimensions and Hierarchies
The dialog box should look like this:
Click OK.
6
Create the State level. To do this, select the Timezone node and click
the Create a new level button. The Level Details dialog box opens:
§
§
§
§
§
§
Into the Name box, type State
From the Source Database list, choose Tutorial Reference
Into the Source Table box, enter ds_location
Into the Source column for Id box, enter state_cd
Into the Source column for Caption box, enter state_name
Into the Source column for Parent box, enter timezone_cd.
51
52
Dimensions and Hierarchies
DecisionStream Tutorial
Most multi-table hierarchies follow the one-to-many relationships inherent in
normalized, operational data. For example, in the State level,
ds_location.timezone_cd is a foreign key that refers to the primary key of the
table from which the members of the next highest level come. You can see
this 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:
DecisionStream Tutorial
9
Dimensions and Hierarchies
53
Click Finish to close the wizard.
10 Finally, store the hierarchy definition by clicking Save Current
Catalog on the toolbar.
Viewing the Location Hierarchy
You can view the hierarchy in the Hierarchy Explorer.
To view the hierarchy:
1
In the Reference window, select the Location hierarchy and choose
Hierarchy Explorer from the Reference menu.
2
Check that Location (H) is selected in the Reference Item list and click
OK.
3
The Location hierarchy opens in the Hierarchy Explorer.
Hierarchy ‘Location’ in Hierarchy Explorer
Expand the nodes in the Elements pane and examine the generated hierarchy.
The hierarchy contains the top-level ‘ALL’ member that you specified in step
4. 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 the
Timezone level.
54
Dimensions and Hierarchies
DecisionStream Tutorial
Summary
During 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, hierarchies
where you define each member by hand.
DecisionStream uses the concept of attributes to decouple the reference data
and the structure of the hierarchy. This approach affords great flexibility,
allowing DecisionStream to build a single level from multiple data sources, or
many levels from a single data source.
DecisionStream supports four types of hierarchy. However, the abstract
architecture 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 static
members.
Each DataStream can have one or more data sources, which map onto
the DataStream items. Each DataStream item maps to the attributes
of the level that have the same name. Up to four attributes can have a
special property.
−
One attribute must have the Id property. The value of this
attribute provides identification for each member.
−
One attribute can have the Caption property. The value of this
attribute provides a meaningful name for each member.
−
One attribute can have the Surrogate property. DecisionStream
can use this artificial key to ensure consistency between data
sources and to save disk space.
−
One attribute can have the Parent property. The value of this
attribute provides a reference to the next level up the hierarchy.
At each level, you create static members by providing attribute
values for each static member.
DecisionStream builds the hierarchy structure from the levels and their
attributes. It then follows the data-to-attribute mappings to populate the
hierarchy with reference data.
Chapter 7
Builds
Builds are central to DecisionStream Designer. They specify from where
DecisionStream 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, data
transformation, and data delivery. Consider an individual build as the smallest
unit of work that DecisionStream can execute.
A DecisionStream build:
§
§
§
§
Acquires data from the specified sources
Dynamically builds the hierarchies and lookups that apply to the
build
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 types
and field lengths).
56
Builds
DecisionStream Tutorial
This illustration schematically shows the build process:
Having defined a set of connections and the Dimensional Framework, you can
define any number of builds to create and maintain the target data marts.
In this chapter, you create builds of increasing complexity. To create the
builds, you use the Build Wizard, or copy and modify an existing build. You
start with a build that copies a table from one database to another. Expanding
on this, the builds that follow perform aggregation and derivation, acquire data
from 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 of
this tutorial. For information on creating builds by hand, please refer to the
User’s Guide.
The Tutorial Catalog, which DecisionStream Setup installed with the tutorial
data, contains specimen solutions. You can use these to check your work as
you progress through the practical examples.
The tutorial invites you to execute some of the example builds in Check
Only mode. It does this to avoid you having to wait too long before
commencing work on the next build. However, this wait is only a few
minutes 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.
DecisionStream Tutorial
Builds
57
Copying a Table
Copying a table represents the simplest possible build. It acquires data from a
single table of one database and delivers it, unchanged, to a single table in
another database. You may wish to do this to transfer data from one DBMS to
another.
The source and target tables may have table/column names or sizes that are
incompatible with the target database. DecisionStream does not adjust these
by default.
This example copies the ds_sales table from the Tutorial Sales database to the
Examples Datamart.
Creating the Build
In this example, you use the Build Wizard to create the build. The Build
Wizard includes several templates and helps you to create builds quickly.
To create this build:
1
Click Run build wizard on the toolbar. The Build Wizard opens.
2
The first step of the Build Wizard enables you state that you want to
create a new build to copy a table:
§
§
§
Select Create a new build.
From the Select the template to use for this build list, select Data
transfer. This states that you want to copy a table.
Select Yes under Should the build perform a full refresh? This
states that you want DecisionStream to delete then re-create the data
and indexes of the target table (if it exists).
58
Builds
DecisionStream Tutorial
Click Next.
3
Name the build by typing 1_CopyTable into the Name box and then
clicking Next.
4
Define the source data for the build:
§
§
From the Connection list, select Tutorial Sales and click Next.
Select the ds_sales check box. The Build Wizard generates an SQL
statement to retrieve the table ds_sales. You can edit this statement
should it not meet your exact requirements. However, in this case,
the default SQL is satisfactory.
The Build Wizard should look like this:
DecisionStream Tutorial
5
Builds
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 appropriate
element types. For a data transfer, all elements are attributes because this
prevents DecisionStream from performing any aggregation. The next
example examines build elements in more detail.
Click Next.
6
You must now identify the target to which DecisionStream delivers the
data:
§
§
From the Connection list, select Examples Datamart.
Select the Deliver Fact Data check box. Clear both the Deliver
dimension data and Deliver metadata check boxes.
By clicking the Review button, you can see the settings that
DecisionStream applies to deliver the data. These settings include the
naming and partitioning strategies. However, for this build, the default
settings are satisfactory.
Click Finish to complete the build definition and close the Build Wizard.
The new build appears in the Build window and looks like this in the
Build visualization pane:
Build ‘1_CopyTable’ in the Build Visualization pane
You can reveal or hide the Build Visualization pane by choosing Show
View from the View menu.
Testing the Build
Before testing the build, save the catalog to disk by clicking Save current
catalog on the toolbar.
59
60
Builds
DecisionStream Tutorial
You can test the build by executing it in check only mode. DecisionStream
provides three modes of build execution:
§
§
§
Normal – DecisionStream fully executes the build. It builds the
reference structures and acquires the source data. If required, it
creates the target fact tables, dimension tables, and metadata
structures. Finally, it delivers the fact data, dimension data, and
metadata.
Object Creation – DecisionStream creates the target fact data tables,
dimension data tables, and metadata tables. However, it does not
deliver any data.
Check Only – DecisionStream executes the build as far as possible.
However, it discards the data that it would deliver in Normal mode
and does not process any metadata.
To test the build:
1
Select the build and from the Build menu, choose Execute Build. The
Execute Build dialog box opens.
Execute Build dialog box
2
From the Execution mode list, select Check Only.
This mode executes the build but discards the data that would be delivered in
Normal mode. If you execute the build in Normal mode, you can use
SQLTerm to examine the data that this build delivers.
3
Click OK.
DecisionStream Tutorial
Builds
DecisionStream launches DataBuild in a DOS window. As the build
progresses, DataBuild traces the progress and writes information to the
screen.
6
The build completes. Press ENTER to close the DOS window.
Aggregation and Derivation
About Build Elements
DecisionStream uses build elements to provide a layer of abstraction between
the source data and the delivered data. Columns from the source data map to
build elements. Delivery modules subscribe to a subset of these build
elements. This mechanism provides considerable flexibility, allowing
DecisionStream 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 data
organization and provide context to numeric items of data. They
are the keys they represent the business components by which you
want to analyze the data. Common examples are time, product, and
location.
Metrics – numeric or date values that holds a piece of information
for analysis. Typically, metrics represent the key measures of a
business. For example, units, revenue, and cost.
Attributes – values that hold additional information that cannot be
aggregated, such as color. DecisionStream does not perform
aggregation 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 at
each level of a hierarchy, or it can calculate the value of the
derivation at the lowest level and then treat this value as though it
were a metric. The latter method, called ‘calculation at source’, can
eliminate rounding errors in the summary data.
61
62
Builds
DecisionStream Tutorial
DecisionStream aggregates metric elements along dimension elements. That
is, it produces summary data at the higher levels of a hierarchy to which a
dimension element relates. By default, DecisionStream produces this by
summation. However, it provides a large range of alternatives methods that
you can use.
About this Build
In this build, you configure DecisionStream to acquire data from the table
ds_sales and deliver it, together with aggregations. You also create a
derivation element calculated from two columns of the source data table. This
data table has five columns. The following table lists these columns and
indicates whether each column represents a dimension or a metric. Where the
column represents a dimension, the table gives the associated hierarchy.
Where the column is a metric, the table gives the aggregation method that you
will 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 you
specify to summarize the metrics at each hierarchy level. The default
aggregation method is summation.
Creating the Build
To create the build:
1
In the Build window, click Run build wizard on the toolbar. The Build
Wizard opens.
2
DecisionStream displays the first step of the Build Wizard:
§
Select Create a new build.
DecisionStream Tutorial
Builds
§
§
From the Select the template to use for this build list, select
Relational Datamart.
Select Yes under Should the build perform a full refresh?
Click Next.
3
Name the build by typing 2_Aggregation into the Name box and then
clicking Next.
4
Define the source data for the build:
§
§
5
From the Connection list, select Tutorial Sales and then click Next.
Select the ds_sales check box. The Build Wizard generates an SQL
statement to retrieve the table ds_sales. You can edit this statement.
However, in this case, the default SQL is satisfactory.
Click Next. The Build Wizard shows the elements of the build. These
have the same names as those of the previous build. However, the
element 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 by
the icon ‘ ’). Check that this is the case. You can change the type of
an element by selecting that element and then clicking the appropriate
button on the right.
The elements should look like this:
Click Next.
6
Here, you set the properties of the dimension elements. You choose the
hierarchy that relates to each dimension. You also choose whether to
perform aggregation along the dimension and whether to implement
surrogate keys. To do this:
§
§
From the list in the Use Reference column, select the hierarchy to
associate with each dimension:
−
For the period_no dimension, select Fiscal (H)
−
For the state_cd dimension, select Location (H)
−
For the product_cd dimension, select Product (H).
Clear each check box in the Generate Surrogates column.
63
64
Builds
DecisionStream Tutorial
§
Select each check box in the Calculate Aggregates column.
The table of dimension elements should look like this:
Click Next.
7
You must now identify the target to which DecisionStream delivers the
data. To do this:
§
§
§
§
From the Connection list, select Examples Datamart.
Select the Deliver Fact Data check box, and clear both the Deliver
dimension data and Deliver metadata check boxes. The Build
Wizard should look like this:
Configure the build to deliver fact data to a single table by:
a. Clicking Review alongside the Deliver Fact Data check box.
The Review Fact Delivery Properties dialog box opens.
b. Displaying the Generation tab.
c. In the Partition Build group, selecting Use this strategy and
then choosing All data into a single table from the adjacent list.
Change the name of the table to which DecisionStream delivers the
data by:
a. Display the Naming tab.
DecisionStream Tutorial
Builds
b.
c.
65
In the Table Name/Prefix box, enter ds_sales_conso.
Click OK.
Click Finish. The Build Wizard closes and the build definition appears in
the Build window.
The Build Wizard simplifies the creation of most builds. This inevitably
removes some of the flexibility that you have when directly
manipulating builds in the Build Tree. For example, the Build Wizard
cannot create derivation elements and cannot partition data across
databases. The User’s Guide describes in detail the direct manipulation
of builds.
The Build Wizard cannot create derivation elements. Thus, you must edit
the build definition to add a derivation element and to cater for products
that do not appear in the Product hierarchy.
8
Add a derivation element named ‘unit_cost’ that returns the revenue
divided by the number of units sold per product per location per period of
time. To do this:
a. In the Build window, expand 2_Aggregation. Select the Elements
node and from the Build menu select Insert Derivation. The
Derivation Properties dialog box opens.
b.
c.
d.
e.
f.
9
Into the Name box, type unit_cost.
Select the Calculate at Source check box. This causes
DecisionStream to calculate the derivation at the lowest level of each
hierarchy and then to treat it as a metric.
Display the Calculation tab. Into the box, enter
revenue/units_sold. You can type this directly into the box.
However, DecisionStream provides shortcuts to all valid element
names, reference attributes, operators, and functions. To access
these, right-click the box and then choose from the shortcut menu.
Display the Aggregation tab. From the Calculate list, select AVG.
This specifies that you require DecisionStream to return the average
unit cost in the summary data.
Click OK. DecisionStream offers to add the new element to each
delivery module in the build. Click OK.
Modify the dimension product_cd to cater for products that do not
appear in the Product hierarchy. To do this:
a.
In the Build window, select the product_cd element and then click
Properties editor on the toolbar. The Dimension Properties
dialog box opens.
66
Builds
DecisionStream Tutorial
b.
Display the Reference tab and select Include Unmatched Members
check box and then click OK. This specifies that DecisionStream
should include product data that has no corresponding member of the
Product hierarchy. DecisionStream provides foster parents for these
members.
10 Click OK.
Select the node at the top of the build. In the Build Visualization pane, the
build should look like this:
Build ‘2_Aggregation’ in the Build Visualization pane
Executing the Build
Before executing the build, save the catalog to disk by clicking Save current
catalog on the toolbar.
To execute the build:
1
Select the build and click Execute Build on the toolbar. This executes
the 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. Press ENTER to close the DOS window.
Viewing the Execution Log
As DecisionStream executes a build, it traces the progress of the build and
writes trace information to the screen. It writes the same trace information to
a log file within its log directory (C:\Program Files\DecisionStream\Log by
default). 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-digit
number. For example, the log file for the build 2_Aggregation might be
2_Aggregation_001.log.
DecisionStream Tutorial
Builds
67
To access the log files:
1
From the Tools menu, choose Browse Log Files. The DecisionStream
log folder opens.
2
To view a log file, double-click its icon.
§
§
If the ‘LOG’ extension has an association in Windows, the log file
opens in the associated program.
If the ‘.LOG’ extension has no association, the Windows Open With
dialog 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 text
editor, then ensure the Always use this program to open this
file check box remains selected.
c.
Click OK. The log file opens in your selected text editor.
Viewing the Delivered Data
You can view the delivered data in SQLTerm or any application that can work
with Microsoft Access databases.
To view the data in SQLTerm:
1
Click Run SQLTerm tool on the toolbar. SQLTerm opens.
2
From the toolbar list, select Examples Datamart.
3
In the Database Objects pane, expand the Examples Datamart database
and 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 data
and shows it in the lower pane.
68
Builds
DecisionStream Tutorial
Because this build performs aggregation, you can return summary data. For
example, 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'
DecisionStream Tutorial
Builds
Anatomy of a Build
In this section, you examine the various objects that make up the build.
However, this is not a thorough examination and you should refer to the
User’s Guide for full information on the components of a build.
The Build Tree
In the Build window, fully expand the build 2_Aggregation by clicking the
plus 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 selecting
the node and then performing one of these actions:
§
Click the Properties editor toolbar button.
69
70
Builds
DecisionStream Tutorial
§
§
Right-click the node and then choose Properties from the shortcut
menu.
Press F4.
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 consistent
stream of data to the remainder of the build. You can add a data source to a
DataStream by right-clicking the DataStream and then selecting Insert Data
Source from the shortcut menu.
Each data source can have an SQL statement that returns a number of data
columns. The SQL statement can be any valid SELECT statement in the
dialect of SQL of the DBMS. Therefore, the SQL statements can cope with
source data that has a compound primary key. For example, the following is a
valid statement in the dialect of Microsoft Access:
SELECT country & state & city AS location,
product,
units_sold
FROM sales
WHERE 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 DBMS
supports them). However, it is frequently more efficient to use many
DecisionStream data sources than it is to specify joins within SQL.
With the exception of derivation elements, DecisionStream generates one
DataStream item for each build element. It does not create DataStream items
for derivation elements because DecisionStream does not acquire the data for
these directly from the data sources. You can see how the data source
DecisionStream Tutorial
Builds
columns map to the DataStream items by selecting the DataStream node.
The mappings appear in the Build Visualization pane.
Data Source to DataStream mapping
You can change these mappings in the Data Source Mapping properties
dialog 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 to
the column.
Build Elements
DecisionStream supports four types of build element. These are:
§
§
§
§
Dimension elements – the key business components by which you
want to analyze the data.
Metric elements – the key measures of your business.
Attribute elements – elements that are neither dimensions nor
measures. For example, color.
Derivation elements – elements that DecisionStream calculates
from the source data.
71
72
Builds
DecisionStream Tutorial
Each element has a properties dialog box with which you can configure the
element. Although you configure some elements in the examples that follow,
you should refer to the User’s Guide for full information on element
properties.
Procedures
DecisionStream procedures are SQL statements that DecisionStream invokes
during execution of the builds. The three types of procedures are:
§
§
§
Pre – SQL statements that DecisionStream invokes at the start of
build execution.
Pre-Data – SQL statements that DecisionStream invokes after
loading the reference data, but before it begins to acquire the fact
data.
Post – SQL statements that DecisionStream invokes after it has
finished delivering the data.
The example builds do not make use of procedures. Therefore, you should
refer 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 types
of delivery module:
§
§
§
Fact Delivery Modules – deliver fact data.
Dimension Delivery Modules – deliver dimension data.
Metadata Delivery Modules – deliver metadata specific to a
particular OLAP tool.
By way of its delivery modules, a DecisionStream build can deliver data
simultaneously to multiple databases and database management systems; it
can simultaneously populate multiple OLAP targets; it can partition data both
horizontally and vertically. You can disable individual delivery modules; you
can disable all delivery modules of a particular type. Thus, DecisionStream
delivery modules enable flexible, precise control over data delivery. Please
refer to the User’s Guide for full information.
DecisionStream Tutorial
Builds
Multiple Data Sources
In this build, you add a second data source to the build that you created
previously. You will duplicate, and then modify, the previous build. While
doing 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 of
granularity.
Duplicating an Existing Build
To duplicate an existing build:
1
Select the 2_Aggregation build and from the Build menu choose
Duplicate. DecisionStream creates a duplicate, named
‘2_Aggregation:1’, of the build.
2
Rename the new build:
a.
Select the new build and click Properties editor on the toolbar.
b.
In the Build Properties dialog box, enter 3_MultipleSource into
both the Name and Caption boxes.
Click OK.
c.
3
Rename the data source of the new build:
a. Expand 3_MultipleSource and then its DataStream.
b.
c.
d.
Select the data source 2_Aggregation and click Properties editor
on the toolbar.
Into the Name box of the Data Source Properties dialog box, enter
SalesSource.
Click OK.
73
74
Builds
DecisionStream Tutorial
Adding a Data Source
The new data comes from the table ds_forecast in the Tutorial Sales database.
You can inspect the structure of this table in SQLTerm. The following
illustration shows this structure:
DecisionStream can accept source data at different levels of granularity. In
this example, as suggested by the column quarter_no, the table gives forecast
information by fiscal quarters. The table ds_sales gives information by fiscal
periods. Therefore, to merge these data sources, DecisionStream must accept
data at both the period and quarter levels of the Fiscal hierarchy.
Two columns (units_forecast and revenue_forecast) exist in the table
ds_forecast but not in the table ds_sales. You must create new build elements
to cater for these columns. To do this:
Creating Build Elements
The new elements are metrics that correspond to the columns units_forecast
and revenue_forecast.
To add the new build elements:
1
Expand the build 3_MultipleSource.
2
Select Elements and from the Build menu choose Insert Metric. The
Metric Properties dialog box opens.
3
Into the Name box, type units_forecast.
4
Click OK. DecisionStream offers to add the new element to each
delivery module in the build. Click OK.
5
In a similar manner, create a new metric element named
‘revenue_forecast’.
DecisionStream uses summation as the default aggregation function. You
require this aggregation function. Hence, you do not need to set this
explicitly.
DecisionStream Tutorial
Builds
Adding the New Data Source
To add the new data source
1
Select the DataStream of 3_MultipleSource and from the Build menu
choose Insert Data Source. The Data Source Properties dialog box
opens. Into the Name box, type ForecastSource and then click OK.
2
Expand the new data source and select the SQL node.
3
Click Properties editor on the toolbar.
4
From the Database list, select Tutorial Sales and then click SQL
Helper.
5
In the Database Objects pane, double-click Tutorial Sales and then
control-drag ds_forecast to the SQL Query pane.
The SQL Helper window should look like this:
6
Click OK in SQL Helper and the Data Source SQL dialog box.
7
Map the columns of the new data source to the appropriate build
elements. To do this:
a.
Select the Mapping node of ForecastSource and click Properties
editor on the toolbar. The Data Source Mapping dialog box
opens.
75
76
Builds
DecisionStream Tutorial
b.
In this dialog box, map each column to the appropriate build element
by dragging the element to the column:
§
§
§
§
§
Drag the period_no element to the quarter_no column
Drag the state_cd element to the state_cd column
Drag the product_cd element to the product_cd column
Drag the units_forecast element to the units_forecast column
Drag the revenue_forecast element to the revenue_forecast
column.
The Data Source Mapping dialog 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 column
mappings. To view this, select the DataStream of 3_MultipleSource.
DecisionStream shows the mappings in the Build Visualization pane.
DecisionStream Tutorial
Builds
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 the
dimension period_no to allow DecisionStream to accept source data at both
the Period and Quarter levels. To do this:
To modify the properties of period_no dimension:
1
Select the period_no element and click Properties editor on the
toolbar. The Dimension Properties dialog box opens.
2
Display the Reference tab.
77
78
Builds
DecisionStream Tutorial
3
In the Input column, select the check box for the level Quarter. The
dialog box should look like this:
4
Click OK.
Select the top node of the build. In the Build Visualization pane, the build
should look like this:
Build ‘3_MultipleSource’ in the Build Visualization pane
DecisionStream provides a graphical view of the relationship between the
dimension elements and their associated hierarchies. This view also shows at
which hierarchy levels DecisionStream accepts and delivers data. To see this,
select any element. DecisionStream shows the view in the Build
Visualization pane.
DecisionStream Tutorial
Builds
Dimension Element and Hierarchy relationships, build ‘3_MultipleSource’
In the preceding illustration, you can see that the Fiscal hierarchy accepts
data at the Quarter and Period levels; the other hierarchies accept data only
at the lowest level. Because the build performs aggregation, it can output
fact data at all hierarchy levels. However, you could modify this (in the
properties dialog box of the corresponding dimension element) to output
only summary data.
Testing the Build
Before testing the build, save the catalog to disk by clicking Save current
catalog on the toolbar.
You can test the build by executing it in check only mode.
To test the build:
1
Select the build and from the Build menu choose Execute Build. If you
executed a previous build, then the Target Table Check dialog box
opens. This dialog box reports inconsistencies in the target tables.
Click Drop Tables and then click Yes to confirm this action.
2
The Execute Build dialog box opens.
3
From the Execution mode list, select Check Only.
4
Click OK.
Whenever you execute a build, DecisionStream checks whether the
target tables exist and have the correct structure. If it finds
inconsistencies, 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.
79
80
Builds
DecisionStream Tutorial
DecisionStream launches DataBuild in a DOS window.
As the build progresses, DataBuild traces the progress and writes
information to the screen.
5
The build completes. Press ENTER to close the DOS window.
Adding Inventory Information
In this build, you add inventory information to a duplicate of the previous
build. The new data source contains inventory information with each row
giving the stock held of a particular product, at a particular location, at the
start of a particular fiscal period. Before you can proceed, you should know
something of aggregation exceptions and dimension datasets.
Aggregation Exceptions
Assume that you want to know the total number of all items at a particular
location 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 element
to 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 in
month 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 of
situation. An aggregation exception instructs DecisionStream to deliver the
first (or last) value of a particular metric when aggregating along a particular
dimension. For example, using an aggregation exception, you can instruct
DecisionStream to deliver the stock level for the first (or last) period in each
quarter.
Dimension Domain Properties
The dataset of a dimension defines the set from which each member draws its
value. The domain of the dimension is the set of different values that exist
within the dimension. It is a subset of the dataset.
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 domain
may not include one or more fiscal periods. For example, assume that the
dataset includes all of 1998. At the end of October 1998, the source data
would not include data for November and December of 1998. Therefore, the
dimension domain would not include those months. The following
illustrations show the dataset and domain respectively for the latter half of that
year.
Dataset (left) and Domain (right) for the latter half of 1998.
Similarly, if the company did not trade during a particular period (for
example, if they were closed for vacation), then the source data (and hence the
dimension domain) would not contain that period.
When delivering aggregation exceptions, DecisionStream must be able to
identify dataset members that are missing from the domain. Unless it can do
this, DecisionStream cannot determine the full range of each summary
hierarchy member (for example, it the preceding example, DecisionStream
could not determine that the range for Q4 was {Oct, Nov, Dec}).
During build execution, DecisionStream constructs the domain of each
dimension. Either it can construct the domain from the associated hierarchy,
or it can construct the domain dynamically from the source data. The Domain
tab of the Dimension Properties dialog box enables you to specify from
where DecisionStream should obtain the domain of the element. The Domain
Type column in this tab contains the options Dynamic Domain and
Reference 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 the
dimension. Therefore, the domain consists of all values that are present in the
hierarchy.
82
Builds
DecisionStream Tutorial
If you set the domain type to Dynamic Domain, then DecisionStream cannot
deliver an aggregation exception for that dimension. Therefore, you must
always set the domain type to Reference Domain if you require an
aggregation exception for the dimension.
Creating the Build
Creating a Duplicate Build
To create a duplicate build:
1
Select 3_MultipleSource and from the Build menu choose Duplicate.
DecisionStream creates a duplicate build, named 3_MultipleSource:1.
2
Select the new build and click Properties editor on the toolbar. The
Build Properties dialog box opens.
3
Change the name and the caption to 4_AddStock and then click OK.
Creating New Build Elements
The new build elements cater for the inventory information. Each uses an
aggregation exception to allow DecisionStream to deliver the stock value at
the first (or last) period of each quarter and year.
To create new build elements:
1
Expand the build 4_AddStock.
2
Select the Elements node and from the Build menu choose Insert
Metric. The Metric Properties dialog box opens.
3
Into the Name box, type opening_stock.
4
Display the Aggregation tab and create the exception:
a. Select the Exception check box.
b. Select First and, from the adjacent list, select period_no.
DecisionStream Tutorial
Builds
83
The dialog box should look like this:
c.
Click OK. DecisionStream offers to add the new element to each
delivery module in the build. Click OK.
This metric element represents the opening inventory level for each
quarter, and year.
5
In a similar manner, create a metric element, named ‘closing_stock’, that
has an aggregation exception that returns the last value with respect to the
dimension period_no. The Aggregation tab for this metric element
should look like this:
This metric element represents the closing inventory level for each
quarter, and year.
84
Builds
DecisionStream Tutorial
Because DecisionStream cannot deliver an aggregation exception for a
dimension 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 element period_no and click Properties editor on the
toolbar. The Dimension Properties dialog box opens.
2
Display the Domain tab. From the Domain Type list, select
REFERENCE DOMAIN.
3
Click OK.
You must now add a data source to the build. From this data source,
DecisionStream acquires the inventory information. DecisionStream can
accept data from multiple databases (and database management systems). The
databases need not reside on the same computer or run under the same
operating system. However, when you execute the build, DecisionStream
must be able to access all the databases that contribute to the build. In this
example, the inventory data comes from the table ds_stock in the Tutorial
Stock database.
Adding the New Data Source
Adding the new data source:
1
Select the DataStream icon and from the Build menu choose Insert
Data Source. The Data Source Properties dialog box opens.
2
Into the Name box, type StockSource and then click OK.
3
Expand the data source StockSource and select the SQL node.
4
Click Properties editor on the toolbar.
5
From the Database list, select Tutorial Stock and then click SQL
Helper.
6
In the Database Objects pane, double-click Tutorial Stock and then
control-drag ds_stock to the SQL Query pane.
7
Click OK in SQL Helper and in the Data Source SQL dialog box.
DecisionStream Tutorial
8
Builds
Map the columns of the new data source to the appropriate build
elements. To do this:
a.
b.
Select the Mapping node of StockSource and click Properties
editor on the toolbar.
In this dialog box, map the columns to the appropriate build
elements:
§
§
§
§
§
Drag the period_no element to the period_no column
Drag the state_cd element to the state_cd column
Drag the product_cd element to the product_cd column
Drag the opening_stock element to the stock_units column
Right-drag the closing_stock element to the stock_units
column, thus adding it to the existing mapping.
The Data Source Mapping dialog box should look like this:
c.
Click OK.
Two elements (opening_stock and closing_stock) map to the stock_units
column.
9
Click Save Current Catalog to save your work.
85
86
Builds
DecisionStream Tutorial
Select the top node of the build. In the Build Visualization pane, the build
should look like this:
Build ‘4_AddStock’ in the Build Visualization pane
Test the new build using check-only mode. To do this:
1
In the Build window, right-click the build and choose Execute Build
from the shortcut menu.
2
If DecisionStream prompts you to drop the existing table ds_sales_conso:
a. Click Drop Table
b. Click Yes to confirm this action
3
From the Execution mode list, select Check Only.
4
Click OK.
Viewing the New Mappings
To view a graphical representation of the mappings between the DataStream
and the data sources, in the Build window, select the DataStream.
DecisionStream shows the mappings in the Build Visualization pane.
DecisionStream Tutorial
Builds
87
Mappings for the DataStream of build ‘4_AddStock’
Partitioned Delivery
DecisionStream supports both horizontal and vertical partitioning of the
delivered fact data. It uses two mechanisms to support this.
Its subscription mechanism supports vertical partitioning (partitioning into
column subsets). That is, each delivery module subscribes to certain build
elements. DecisionStream delivers only those elements to which the delivery
module subscribes. You met the concept of subscription when you added
elements to previous builds. When DecisionStream added the new elements
to the existing delivery modules, it caused those delivery modules to subscribe
to the new elements.
88
Builds
DecisionStream Tutorial
DecisionStream supports horizontal partitioning (partitioning into row
subsets) via filters. Within each delivery module, you can specify up to one
output filter and any number of level filters. Each level filter defines the
hierarchical levels at which DecisionStream delivers the data via that delivery
module. Thus, level filters enable you to create summary fact data tables at
different hierarchy levels. In this example, you use level filters to partition the
delivered data into three tables, one for each level of the Fiscal hierarchy.
Creating a Duplicate Build
Create a duplicate build:
1
Select 4_AddStock and from the Build menu choose Duplicate.
DecisionStream creates a new build named 4_AddStock:1.
2
Select the duplicate build and click Properties editor on the toolbar. In
the Build Properties dialog box, change both the name and caption to
5_MultipleDelivery. Click OK.
3
The duplicate build has an unwanted delivery module that delivers all the
data into a single table. Remove this by expanding the build, then the
Delivery Modules node, and then the Fact Delivery Modules node.
Select the delivery module ds_sales_conso and from the Build menu
choose Delete. Click OK to confirm the action.
Adding the Delivery Modules
You can add the required delivery modules by hand. However, the Build
Wizard can help you to add additional delivery modules to an existing build.
You can choose an alternative template when you do this. Thus, this enables
you to configure a build using more than one template.
In this example, you use the Build Wizard to add the required delivery
modules.
To add the delivery modules:
1
Click Run build wizard on the toolbar. The Build Wizard opens.
2
Select Add to an existing build and then select the build
5_MultipleDelivery.
DecisionStream Tutorial
Builds
3
From the Select the template to use for this build list, choose
Relational Datamart. Under Should the build perform a full refresh,
select Yes. Click Next.
4
From the Connection list, select Examples Datamart. Select the
Deliver Fact Data check box, and clear both the Deliver Dimension
Data and Deliver Metadata check boxes.
5
Click Review (adjacent to Deliver Fact Data). The Review Fact
Delivery Properties dialog box opens. In the Partition Build group,
select Use settings that I will define. This causes two additional tabs
(Split Dimensions and Split Levels) to appear.
6
Define the dimension on which DecisionStream must partition the data.
To do this:
a. Display the Split Dimensions tab.
b. Select period_no and clear both state_cd and product_cd.
7
Display the Naming tab. Establish the naming strategy for the delivered
tables. To do this, change the entry in the Table Name/Prefix box to ds.
The dialog box should look like this:
8
Click OK in this dialog box to return to the Build Wizard.
9
Click Finish.
89
90
Builds
DecisionStream Tutorial
In the Build window, select the build MultipleDelivery. The Build
Visualization Pane should look like this:
Build ‘5_MultipleDelivery’ in the Build Visualization pane
Test the build using check-only mode.
Delivering Data to a Cognos BI Mart
This example differs from the others in that it does not modify a previous
example. It acquires data from a single source table, and delivers it (without
aggregation) to a Cognos BI Mart.
In addition to a Cognos Impromptu Catalog and a PowerPlay Transformer
model, DecisionStream creates a relational data mart (star schema) with the
fact and dimension data. It optimizes the PowerPlay Transformer model to
analyze and report on this datamart. It also creates sample PowerPlay and
Impromptu reports. From the PowerPlay reports, you can drill through to
Impromptu to examine detailed data.
During execution of this build, DecisionStream invokes both PowerPlay and
Impromptu. Therefore, you must have these Cognos products installed on
your computer to execute this build.
To create this build:
1
Click Run build wizard on the toolbar. The Build Wizard opens with
the Create a new build option and the Cognos BI Mart (Star)
template selected. Under Should the build perform a full refresh,
select Yes. Click Next
2
Into the Name box, type BIMartBuild. Click Next.
DecisionStream Tutorial
3
Builds
Identify the source for the build:
a. From the Connection list, select the Tutorial Sales connection.
Click Next.
b. Select the check box adjacent to the table ds_sales.
The Build Wizard should look like this:
Click Next.
4
The Build Wizard shows the default elements for the build. For this
build, these are correctly defined. Click Next.
5
Associate each dimension element with the appropriate hierarchy by
choosing the hierarchy from the Use Reference column:
§
§
§
§
6
For period_no, choose the Fiscal hierarchy
For state_cd, choose the Location hierarchy
For product_cd, choose the Product hierarchy
Click Next.
Specify the data that this build delivers:
a. From the Connection list, select Examples Datamart.
b. Ensure that the Deliver Fact Data, Deliver Dimension Data, and
Deliver Metadata check boxes are selected.
91
92
Builds
DecisionStream Tutorial
The Cognos BI Mart (Star) template automatically delivers metadata to
both PowerPlay and Impromptu. If you do not have one of these
products, you can choose not to generate metadata for that product. To
do this:
a. Click the Review button adjacent to Deliver Metadata.
b. The Review Metadata Delivery opens.
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 OLAP
tools. To do this, select the check box that corresponds to the required
format.
7
Click Finish to close the Build Wizard.
8
Execute the build in Normal mode.
In the Build Visualization pane, the build should look like this:
Build ‘BIMartBuild’ in the Build Visualization pane
Viewing the Results
To view the results of executing this build, you must have both Cognos
PowerPlay and Cognos Impromptu installed on your computer.
In this part of the exercise, you drill down through the Location and Product
dimensions in PowerPlay, and finally drill through to an Impromptu report.
DecisionStream Tutorial
Builds
93
To view the results of executing this build:
1
From the Tools menu, choose Browse Data Files. The DecisionStream
data directory opens.
2
Locate the file BIMartBuild.mdc. This file is the PowerCube that
DecisionStream created when you executed the build. Double-click this
file.
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 the Location folder and
choose Eastern Standard Time from the fly-out menu.
b. Point to the Product folder and choose Kitchen from the fly-out
menu. 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 of FY97
and Florida.
b. From the Explore menu, choose Drill Through. The Drill Through
dialog box opens.
c. From the Impromptu Reports folder, choose f_bimartbuild then
click OK.
94
Builds
DecisionStream Tutorial
d.
This report opens in Impromptu:
Please explore the PowerCube in Cognos PowerPlay and drill through to
Impromptu to see how easily you can access the data at any hierarchy level
combination.
PowerPlay Dimensions
When you executed the build BIMartBuild, DecisionStream delivered the
Fiscal, Location, and Product hierarchies to PowerPlay and Impromptu. You
can compare the PowerPlay dimensions with the DecisionStream hierarchies.
To compare the PowerPlay dimensions with the DecisionStream
hierarchies:
1
In PowerPlay, click Dimension Viewer on the toolbar. The PowerPlay
window splits into two panes, the left of which contains a view of the
dimensions.
2
In DecisionStream, restore the Reference window. Select the Fiscal
hierarchy, from the Reference menu choose Hierarchy Explorer, and
then click OK.
3
In both the PowerPlay Dimension View pane and the DecisionStream
Hierarchy Explorer, expand the Fiscal hierarchy, the FY96 node, and
the FY96 Q1 node.
DecisionStream Tutorial
Builds
Hierarchy ‘Fiscal’ in DecisionStream
95
Dimensions in PowerPlay
4
Compare the two views. Notice how they correlate.
5
Expand other nodes in both views and other hierarchies in
DecisionStream Hierarchy Explorer, noting that the PowerPlay
dimensions have the same structure as the DecisionStream hierarchies.
Delivering Data to Microsoft OLAP
Services
This example acquires data from a single source table, and delivers fact data
and dimension data to the Examples Datamart. It delivers metadata to a
Microsoft OLAP Services database. The metadata consists of a virtual cube
for the build and a cube for the fact delivery.
During execution of this build, DecisionStream invokes the Microsoft OLAP
Services Client. Before you can successfully execute this build:
§
§
§
You must have the Microsoft OLAP Services Client installed on your
computer.
Microsoft OLAP Services must contain a database that contains a
DataSource definition that refers to the database into which
DecisionStream delivers the fact and dimension tables.
You must configure a DecisionStream connection for the Microsoft
OLAP Services database.
96
Builds
DecisionStream Tutorial
To create the Microsoft OLAP Services DataSource:
1
Start the Microsoft OLAP Manager.
2
In the left pane, expand the OLAP servers folder.
3
On an appropriate server, create a database with the name ‘DS_Tutorial’.
To do this:
a. Right-click the server and choose New Database from the shortcut
menu.
b.
Enter the name DS_Tutorial and then click OK.
4
Expand the DS_Tutorial database node, then the Library node.
5
Create the required data source. To do this:
a. Right-click the Data Sources node
b. In the Data Link Properties dialog box, select the connection type
for the Examples Datamart (ExampleMart.mdb) database.
c. Click Next and enter the configuration information for the Examples
Datamart 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 the Edit connection definitions toolbar button. The Connections
dialog box opens.
2
Click New. The Connection Properties dialog box opens.
3
Into the Alias box, type MSOLAP.
4
Specify the Microsoft Olap Services database. To do this:
a. Display the Connection Details tab.
b. In the left pane, select the MS OLAP Services connection type.
c. From the Server list, select the server on which you created the
DS_Tutorial database.
DecisionStream Tutorial
Builds
d.
5
97
From the Database list, select DS_Tutorial.
Create a mapping between the Examples Datamart DecisionStream
connection and the Microsoft OLAP Services data source that you created
earlier. To do this:
a. Click the Edit Mapping button. The MSOLAP DataSource
Mapping dialog box opens.
b. In the lower-left pane, double-click the Examples Datamart
connection. This connection is copied to the upper pane.
c. In the lower-right pane, double-click the DataSource entry. This is
copied to the upper pane, completing the required mapping.
The MSOLAP DataSource Mapping dialog box should look like
this:
Click OK.
The name of the DataSource comes from Microsoft OLAP
Services. Thus, it may differ from that shown in the preceding
illustration.
Having created the Microsoft OLAP Services data source and the
DecisionStream connection, you can use them with any number of
DecisionStream builds. This example delivers the fact data, dimension data,
and metadata for the Tutorial Sales database.
98
Builds
DecisionStream Tutorial
To create this build:
1
Click the Run build wizard toolbar button. The Build Wizard opens
with the Create a new build option selected. From the Select the
template to use for this build list, choose Microsoft OLAP Services
Datamart. Under Should the build perform a full refresh, select Yes.
Click Next
2
Into the Name box, type MSOLAPBuild. Click Next.
3
Identify the source for the build:
a. From the Connection list, select the Tutorial Sales connection.
Click Next.
b. Select the check box adjacent to the table ds_sales.
The Build Wizard should look like this:
Click Next.
4
The Build Wizard shows the default elements for the build. For this
build, these are correctly defined. Click Next.
5
Associate each dimension element with the appropriate hierarchy by
choosing the hierarchy from the Use Reference column:
§
§
§
For period_no, choose the Fiscal hierarchy
For state_cd, choose the Location hierarchy
For product_cd, choose the Product hierarchy
Click Next.
DecisionStream Tutorial
6
Builds
Specify the data that this build delivers:
a. From the Connection list, select Examples Datamart.
b. Ensure that the Deliver Fact Data, Deliver Dimension Data, and
Deliver Metadata check boxes are selected.
c. Configure the build to deliver fact data into a single table. To do
this:
i.
Click the Review button next to the Deliver Fact Data check
box. The Review Fact Delivery Properties dialog box opens.
ii.
Display the Generation tab. In the Partition Build group,
select Use this strategy and choose All data into a single table.
The Review Fact Delivery Properties dialog box should look like
this:
Fact Delivery Generation properties
Click OK.
7
99
Click Finish to close the Build Wizard.
The Microsoft OLAP Services Datamart template automatically delivers
metadata to the primary connection to Microsoft OLAP Services. This
is the first connection that you create in the catalog. If you want
DecisionStream to deliver the metadata to a different Microsoft OLAP
Services database, then you must edit the build by hand. Please refer to
the User’s Guide for information on editing builds.
100
Builds
DecisionStream Tutorial
In the Build Visualization pane, the build should look like this:
Build ‘MSOLAPBuild’ in the Build Visualization pane
8
Execute the build in Normal mode.
Viewing the Results
You 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
Glossary
Aggregation
The process of taking data at one level of detail and summarizing it to a
lower level of detail. The process can occur in a number of levels
simultaneously (multi-level aggregation) or even in a number of
dimensions 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/95
systems.
Break
The identification of a change in the dimension sequence. It is used to
improve Engine performance and reduce memory usage.
Build
An DecisionStream unit of work that goes through the steps of
Acquisition, 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 source
derivation is calculated for detail data and aggregated as though it were a
metric. It is the equivalent of performing a calculation in the SQL query
and then treating the resulting column as a metric.
102
Glossary
DecisionStream Tutorial
Calculation
Either the method used to generate a derivation, or the method used for
aggregation of a metric.
Caption
A piece of information that is associated with a member id or name. This
is often used (for display and presentation purposes) in preference to the
id or name.
Catalog
A repository for storing DecisionStream Build, Reference, and
Connection specifications.
Check Only
A method of executing a Build that results in the entire Build process
being completed apart from the final delivery of data. It is generally used
during 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 a
catalog.
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 database
and the connection method. DecisionStream collects this information and
associates it with a database alias for ease of reference.
Connection Method
The method of connection to a source of data. The method, named from
the 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 data
and its organization is of limited scope or is targeted at a particular group
of users.
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, you
may 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 be
accessed directly by users or it may be used to feed data marts.
Generally, the data warehouse is used as the source of reporting data for
the 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 member
of 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 it
represents the holder for the id of a hierarchy member. In this case it is
explicitly tagged as having special significance. Tags are available for
member ids ($ID), captions ($CAPTION), and parents ($PARENT).
104
Glossary
DecisionStream Tutorial
This mechanism gives a layer of abstraction that allows DecisionStream
to build a single hierarchical level from multiple sources.
Date Hierarchy
The Designer generally builds hierarchies with reference to data in
relational tables. Often, this is not possible for dates because the data is
frequently not held in relational tables. The Designer provides a wizard
that you can use to generate a hierarchy of dates that is based on a date
range that you specify.
DBMS
Database Management System.
Delivery
The operation that results in data being delivered to target systems via the
delivery modules.
Delivery Module
A software module (in Windows, this is a DLL) that provides support for
delivery of data and metadata to a variety of target system types (for
example, relational databases).
Derivation
A metric that the DecisionStream derives (that is, calculates) rather than
obtains directly from the data source.
Designer
DecisionStream Designer is the Windows 95/98/NT software that you use
to produce Build specifications and Dimensional Frameworks.
Dimension
A data element that is fundamental to data organization and provides
context to numeric items of data. A dimension consists of discrete values
that represent the keys of the data. Common examples are time, product,
and location.
Dimension Build
An DecisionStream build process that delivers only dimension data.
DecisionStream Tutorial
Glossary
105
Dimensional Framework
A repository for reference structures (hierarchies and lookups) that
promotes 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 that
is 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 are
processed.
Reference - the reference object associated with the dimension is taken as
the domain.
Drill
To move between the levels of a hierarchy by following parent-child
links. Drilling down follows the link from parent to child. Drilling up
follows the link from child to parent.
Driver
A software module (a DLL in Windows) that provides support for a
certain type of database access (for example, Oracle SQL*Net, ODBC).
Dynamic Members
Members of hierarchies or lookups that are defined by reference to tables
in 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 the
transformations.
106
Glossary
DecisionStream Tutorial
Environment
A value that indicates the execution circumstances of the DecisionStream
Engine and, therefore, provides information about the method of
connection 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 passes
to a delivery module. The test results establish whether DecisionStream
should deliver the data row.
Foster Parent
An artificially introduced member that acts as a parent for members that
either have no defined parent or whose defined parent cannot be found at
the next highest hierarchy level.
Function
A routine that processes a set of parameters in order to derive a new
value.
Hierarchy
A structure that holds related members organized into levels.
Hierarchy Explorer
An DecisionStream application that builds a hierarchy or lookup from its
statically and dynamically defined members. It provides facilities to
explore the data of the hierarchy.
id
The value that uniquely identifies a member in data. For example, the id
for a product may be its product-code.
Key
The set of columns in a table that identify set of rows within the table.
DecisionStream Tutorial
Glossary
107
Level
Hierarchies are made up of levels with a level being used to hold a set of
members. Members at a level are related to the members at the nexthighest 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 combination
of 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 arranged
into hierarchical levels. You can consider a lookup to be a one-level
hierarchy.
Mapping
The relationship between columns (from an SQL query) and the
DecisionStream objects to which they relate. DecisionStream has
mappings that relate data sources to build elements and level data selects
to dataset attributes.
Member
A node in a hierarchy.
Metadata
Data that describes the delivered data. Typically, metadata defines the
data structure and the domain of each dimension. It can also provide
aliases 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 for
analysis. For example, units, revenue, cost, etc.
Model
A system that consists of fact data and metadata.
108
Glossary
DecisionStream Tutorial
Module
A delivery module, that is, a software module (in Windows, this is a
DLL) that provides support for delivery of data and metadata to a variety
of target system types (for example, relational databases).
Multi-dimensional
Any system for which the dimension is the fundamental basis of data
organization.
Multi-dimensional Aggregation
The process of taking data at one level of detail and simultaneously
summarizing 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, operational
data is normalized.
Notes
Optional, text-based information that can be saved with DecisionStream
objects.
ODBC
A connectivity method that provides a common interface to a wide
variety of database products.
OLAP
On-line analytical processing.
Output filter
A filter that can be specified in a delivery module to restrict delivery of
rows to the target system. The output filter takes any expression that
evaluates to TRUE or FALSE.
Output Level
A level of a hierarchy at which DecisionStream will output data. Output
data may be generated by aggregation.
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 to
disk and retrieve them to main memory when next needed. This process
is called 'paging'.
Parametric Interface
A human-computer interface, consisting of on-screen forms, where the
user enters values into pre-defined boxes.
Parent
The member on the next-highest level of a hierarchy that is related to the
member under consideration.
Partitioned Delivery
Delivery of a data stream to a number of targets where the data stream is
divided (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 it
represents the holder for the id of a hierarchy member. In this case it is
explicitly tagged as having special significance. Tags are available for
member ids ($ID), captions ($CAPTION), and parents ($PARENT).
Reference Data
Semi-static data that is used to provide context for other data within a
relational database. For example, a product master will contain a list of
products with which the company deals. The product master may also
contain supporting information, such as product characteristics.
Referential Integrity
In a relational database, the posting of foreign keys represents the
relationship between one table and another. Such a relationship exhibits
referential integrity if the set of foreign key values is a subset of the
referenced primary key values. That is, there are no 'orphaned' foreign
keys.
Roll-up
To summarize data, creating summary records at a higher hierarchical
level.
110
Glossary
DecisionStream Tutorial
Source
A data source. That is, somewhere from which the Engine or the
Designer can acquire data.
SQL
Structured Query Language. An almost universal query language that
combines 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 may
be either data definition (for example, CREATE TABLE) or data
manipulation (for example, SELECT).
SQLTerm
A terminal monitor application that provides a common interface to the
various 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 the
specification, 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. Typically
the merging and aggregation of source data to provide delivery elements.
Type
See data type.
DecisionStream Tutorial
Glossary
Unmatched Member
A member in a dimension that does not match with a member in the
associated hierarchy.
111
112
Glossary
DecisionStream Tutorial
Index
A
adding a data source to builds, 78, 89
aggregation, 66
Aggregation Advisor, 13
aggregation exception, 85
anatomy (of a build), 73
associating dimension with hierarchy, 68
attributes, 44, 65
B
BI Mart, 95
Break/Sparsity Advisor, 13
build elements, 76
creating, 79, 87
Build Tree, 73
Build Visualization pane, 13
Build window, 12
Build Wizard, 13, 60
builds, 18, 59
adding a data source, 78
adding inventory information, 85
attributes, 65
copying a table, 61
data source, 62
delivering data to a Cognos BI Mart, 95
dimensions, 65
duplicating, 78, 87, 93
elements, 65
executing, 63
metrics, 65
multiple data sources, 77
partitioned delivery, 92
simple build, 66
templates, 61
testing, 63
C
catalog, 9
catalogs
creating, 25
changing the domain type, 89
components, 9
concepts, 15
connecting
to reference database, 28, 30
to sales database, 30
to stock database, 30
connections, 16, 27
Connections dialog box, 12
constructing
fiscal hierarchy, 40
location hierarchy, 53
product hierarchy, 48
conventions, typographical, vii
copying tables, 61
creating
build elements, 79, 87
catalog, 25
data source, 23
hierarchy levels, 41
D
data
connecting to, 27
examining, 38
reference, 28
transformation, 18
data delivery, 19
data mart, 30
data source, 16
adding to a build, 79
adding to build, 89
adding to builds, 78
creating, 23
mapping, 80, 90
databases
reference, 28, 30
sales, 30
stock, 30
DataSource (Microsoft OLAP Services), 101
DataStream, 45, 75
Literals node, 45
114
Index
Mapping node, 45
SQL node, 45
Date Hierarchy Wizard, 13
decision support, 19
delivering data, 19
delivering data to Cognos BI Mart, 95
delivery modules, 77
derivations, 66
adding, 69
dimension, 17
Dimension Build Wizard, 13, 18
dimension builds, 18
Dimensional Framework, 17
dimensions, 33, 65
associating with hierarchy, 68
domain properties, 85
modifying, 70
modifying properties, 82
domain
changing type, 89
dynamic, 86
properties, 85
reference, 87
duplicating builds, 78
dynamic domain, 86
E
elements, 65
attributes, 65
creating, 79
derivations, 66
dimensions, 65
metrics, 65
modifying dimension properties, 82
elements, build, 76
examining the data, 38
Examples Catalog, 25
exception, aggregation, 85
executing builds, 63
execution log, 71
exercises, practical, 21
F
fiscal hierarchy, 38
fostering, 51
G
Glossary, 107
DecisionStream Tutorial
H
hierarchies, 17, 35
associating with dimensions, 68
attributes, 44
caption attribute property, 57
constructing fiscal, 40
constructing location, 53
constructing product, 48
creating levels, 41
dataset, 43
fiscal, 38
from multiple tables, 53
from the columns of a table, 38
from the rows of a table, 47
id attribute property, 57
levels, 43
location, 53
parent attribute property, 57
product, 47
static member, 52
surrogate attribute property, 57
viewing, 42, 50
Hierarchy Explorer, 42, 43, 50
Hierarchy Wizard, 13
I
interface, DecisionStream Designer, 11
L
levels, 43
adding to a hierarchy, 41
attributes, 44
Literals node, 45
location hierarchy, 53
log files, 71
M
mapping
data source, 90
data source to build elements, 80
viewing, 81, 91
Mapping node, 45
metadata, 19
metrics, 65
Microsoft OLAP Services, 100
modifying dimension properties, 82
DecisionStream Tutorial
O
ODBC data source
creating, 23
ODBC driver, 22
OLTP, 19
operating systems, 10
P
partitioned delivery, 92
PowerPlay dimensions, 99
practical exercises, 21
procedures, 76
product hierarchy, 47
Properties dialog box, 12
R
reference data, 28
reference database, 28, 30
reference domain, 87
Reference window, 12
S
sales database, 30
saving data, 42, 50
snowflake schema, 53
split dimension, 94
Index
SQL, 17
SQL Helper, 80
SQL node, 45
SQLTerm, 12, 17, 38, 71
star schema, 40
stock database, 30
storing data, 42, 50
surrogate, 68
T
table
copying, 61
target data mart, 18
templates, 61
testing builds, 63
toolbar, 12
transforming data, 18
typographical conventions, vii
V
viewing
delivered data, 71
execution log, 71
mappings, 81
Z
zoom, 13
115
116
Index
DecisionStream Tutorial