Lab A: Processing Dimensions and Cubes 27 Lab B: Updating Dimension Data 30 Lab C: Incrementally Updating Cubes 36 Troubleshooting Cube Processing 49 Review 54 Module 9: Processing D
Trang 1Lab A: Processing Dimensions and Cubes 27
Lab B: Updating Dimension Data 30
Lab C: Incrementally Updating Cubes 36
Troubleshooting Cube Processing 49
Review 54
Module 9: Processing Dimensions and Cubes
Trang 2to represent any real individual, company, product, or event, unless otherwise noted Complying with all applicable copyright laws is the responsibility of the user No part of this document may
be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Microsoft Corporation If, however, your only means of access is electronic, permission to print one copy is hereby granted
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property
2000 Microsoft Corporation All rights reserved
Microsoft, BackOffice, MS-DOS, Windows, Windows NT, <plus other appropriate product
names or titles Replace this example list with list of trademarks provided by copy editor Microsoft is listed first, followed by all other Microsoft trademarks in alphabetical order > are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A and/or other countries
<This is where mention of specific, contractually obligated to, third party trademarks, which are added by the Copy Editor>
The names of companies, products, people, characters, and/or data mentioned herein are fictitious and are in no way intended to represent any real individual, company, product, or event, unless otherwise noted
Other product and company names mentioned herein may be the trademarks of their respective owners
Trang 3Instructor Notes
Multidimensional online analytical processing (OLAP) databases include schema and data, both of which change and need updating from the relational database management system (RDBMS) on a regular basis In this module, students learn to manage dimension and cube processing with Microsoft® SQL Server™ 2000 Analysis Services
After completing this module, students will be able to:
! Understand the difference between OLAP schema and data
! Process dimensions
! Perform the three types of cube processes
! Optimize cube processing
! Troubleshoot cube processing
Materials and Preparation
This section lists the required materials and preparation tasks that you need to teach this module
Required Materials
! To teach this module, you need Microsoft PowerPoint® file2074A_09.ppt
Preparation Tasks
To prepare for this module, you should:
! Read all the student materials
! Read the instructor notes and margin notes
! Complete all the demonstrations
! Practice the lecture presentation and demonstration
! Complete the lab
! Review the Trainer Preparation presentation for this module on the Trainer Materials compact disc
! Review any relevant white papers that are located on the Trainer Materials compact disc
Presentation:
75 Minutes
Lab:
75 Minutes
Trang 4Demonstration: Rebuilding the State Dimension
The following demonstration procedures provide information that will not fit in the margin notes or is not appropriate for student notes
In this demonstration, you will rebuild the State dimension and will show students the impacts to the Sales Units cube after the rebuild
! To restore a new database and define a data source
1 In Analysis Manager, right-click the server, click Restore Database, click the Look in list, click the file C:\Moc\2074A\Labfiles\L09\Module
09.CAB, click Open, click Restore, and then click Close
2 Double-click Module 09 to expand the database
3 Below Module 09, double-click the Data Sources folder, right-click the
Module 09 data source, and then click Edit
4 Click the Connection tab of the Data Link Properties dialog box, and then verify that localhost is selected in step 1
5 In step 2, verify that Use Windows NT Integrated security is selected
6 In step 3, verify that Module 09 is selected
7 Click Test Connection and verify that the test succeeded Click OK twice
! To browse the Sales Units cube
1 In the Module 09 database, browse the Sales Units cube
2 Show students that the cube contains two dimensions—State and Time— and one measure—Sales Units
3 Point out that the cube is processed and able to accept queries
! To rebuild the State dimension
1 In the Module 09 database Shared Dimensions folder, right-click the State dimension, and then click Process
The Process a Dimension dialog box opens
Here you see two options for processing a dimension—incrementally updating the dimension and rebuilding the dimension
2 Click Rebuild the dimension structure, and then click OK
The Process dialog box opens and steps through the dimension rebuild
3 After the dimension finishes processing, double-click the line in the Process dialog box that begins with a yellow SQL icon
Here you see the SQL that executes to rebuild the State dimension:
SELECT DISTINCT "dbo"."State"."Country",
"dbo"."State"."Region", "dbo"."State"."STATE_ID",
"dbo"."State"."State_Name" FROM "dbo"."State"
4 Close the View Trace Line window, and then click Close
Demonstration:
10 Minutes
Trang 5! To attempt to browse the Sales Units cube
1 In the Module 09 database, right-click the Sales Units cube, and then click
Browse Data
2 Notice that you receive the following error:
“Unable to browse the cube ‘Sales Units’ Cube not processed To browse sample data for this cube, open Cube Editor, and then on the View menu, click Data.”
You did not change the State source data, and therefore the dimension did not require a rebuild However, if the dimension is rebuilt, the Sales Units
cube is unavailable
After you rebuild a shared dimension, all cubes containing the shared dimension are unavailable for user access
3 Click Close
Trang 6Other Activities
Difficult Questions
Below are difficult questions that students may ask you during the delivery of this module and answers to the questions These materials delve into subjects that are within the scope of the module but are not specifically addressed in the content of the student notes
1 How are incremental updates useful if the Analysis Server is unaware of data warehouse loads and it therefore does not know what data to load from
a table?
You can create a column in the fact table that has an identifying record, such as a time stamp or a batch number You can include the unique record in the WHERE clause of the associated partition definition and filter records based on that identifier
2 Are multiple partitions of a cube processed sequentially, even if they reside
on different computers?
Yes, unless you specify that you want certain partitions to be built in parallel You can do this by using Decision Support Objects (DSO)
Trang 7Module Strategy
Use the following strategy to present this module:
! Introducing Dimension and Cube Processing
Define the term processing and explain that Analysis Server creates SQL
statements to extract information from the data source Next, define the
terms schema and data as they are used in Analysis Services
! Processing Dimensions Explain to students that dimensions must be processed when they are first designed and whenever there are changes or updates in the source dimension tables Describe the interface and the steps to follow to process a shared dimension Explain that there are two ways to process a shared dimension—a rebuild or an incremental update Describe when to use each type of processing and the implications of doing so Explain that private dimensions are created and manipulated in single cubes, and that to process
a private dimension, the entire cube must be processed Finally, define relational OLAP (ROLAP) dimensions and changing dimensions and explain when to use them
! Processing Cubes Begin with an explanation of when to process a cube and how to get to the
Process a Cube dialog box Describe the three options available in the
dialog box—full process, refresh, and incremental update Describe when to use each option and the implications of doing so Introduce the Incremental Update Wizard and the steps involved in performing an incremental update—specifying the data source and specifying the filter expression Explain what happens behind the scenes when using a filter Discuss available properties that affect cube and dimension processing
! Optimizing Cube Processing Explain to students that, while query performance is obviously a high priority when using OLAP cubes, processing time is also important
Describe several ways to improve cube processing performance—
optimizing the data source, optimizing the cube schema, optimizing cube design, and optimizing Analysis Server Explain how to perform each of these types of optimization
! Troubleshooting Cube Processing Describe the three most common cube problems related to processing—missing data, processing errors, and insufficient memory and disk space Give tips and techniques for solving each type of problem
Trang 9Overview
! Introducing Dimension and Cube Processing
! Processing Dimensions
! Processing Cubes
! Optimizing Cube Processing
! Troubleshooting Cube Processing
Multidimensional online analytical processing (OLAP) databases include schema and data, both of which change and need updating from the relational database management system (RDBMS) on a regular basis In this module, you will learn to manage Analysis Server dimension and cube processing with Microsoft® SQL Server™ 2000 Analysis Services
After completing this module, you will be able to:
! Understand the difference between OLAP schema and data
! Process dimensions
! Perform the three types of cube processes
! Optimize cube processing
! Troubleshoot cube processing
In this module, you will learn
about dimension and cube
processing and the various
ways to perform processes
Trang 10# Introducing Dimension and Cube Processing
! Definition of Processing
! Overview of Schema and Data
In this section, you are introduced to dimension and cube processing, and will learn the difference between OLAP schema and OLAP data
Topic Objective
To introduce the concept of
cube and dimension
processing
Lead-in
In this section, you are
introduced to dimension and
cube processing, and will
learn the difference between
OLAP schema and OLAP
data
Trang 11Definition of Processing
! Processing Must Occur Prior to Users Querying the Cube
! Dimension Processing Loads Dimension Data
! Cube Processing Loads Cube Data and Creates Aggregations
! Processing Uses SQL Queries to Populate Dimension and Cube Data
Before users can access data from an OLAP cube, some form of processing
must occur in the cube In Analysis Services, the term processing means
loading dimensions and cube data from the RDBMS data source
When you process dimensions and cubes, Analysis Server creates SQL statements to extract the necessary information from the data warehouse dimension and fact tables In addition, Analysis Server creates any aggregations
in the cube that were designed previously
Before users can access
data from a cube, some
form of processing must
occur in the cube
Trang 12Overview of Schema and Data
! OLAP Schema
! OLAP Data
To master various dimension and data load processes, it is important to
understand the difference between schema and data Definitions of the two
terms as used in Analysis Services may differ from what you are accustomed to when using other databases and technologies
OLAP Schema
Unlike relational databases, where member names are considered data, member
names in Analysis Services are considered part of the schema
The following is true of OLAP schema:
! The schema consists of the dimensional hierarchies and the members that populate these hierarchies
! OLAP schema comes from the dimension tables in the source RDBMS
! Member names, for example Quarter 1, Canada, and Bread, are
commonly referred to as OLAP metadata in multidimensional databases
OLAP Data
The data in Analysis Services is the numeric information, such as units sold,
prices, inventory levels, or dollar revenues
The following is true of OLAP data:
! This numeric information, or data, is commonly referred to as the measures
! OLAP data comes from the fact table in the source RDBMS
Understanding the distinction between schema and data is important for database administrators and OLAP architects
Topic Objective
To describe the differences
between OLAP schema and
OLAP data
Lead-in
It is important to understand
the difference between the
terms schema and data as
they are used in Analysis
Services
Trang 13# Processing Dimensions
! Dimension Processing Overview
! Rebuilding Dimensions
! Incrementally Updating a Dimension
! Processing Private Dimensions
! Understanding ROLAP and Changing Dimensions
A cube consists of one or more dimensions combined with one or more measures The dimensions form the structure or organization for the data values
in the cube Before the Analysis Server can process a cube, it must have already processed each dimension that is used in the cube
In this section, you will learn about dimension processing and the various ways
In this section, you will learn
about dimension processing
and the various ways of
processing dimensions
Trang 14Dimension Processing Overview
! Purpose of Dimension Processing
! Shared Dimension Processing Mechanics
! The Process Dialog Box
Before data can be loaded into a cube, you must first create and process the dimensions of the cube Once you process the dimensions, the Analysis Server can load data from the fact table into the cube and can create aggregations
Purpose of Dimension Processing
You process a dimension when you first create it, when you modify its structure, and when data updates occur in the source data dimension tables After the initial dimension process, you must maintain dimensions on an ongoing basis to reflect changes in the underlying dimension tables—for example, new products are added to the product line, sales representatives change sales regions, and so on Dimensions must reflect the changes in the business structure
Two methods are available to the Analysis Server developer for processing shared dimensions:
! Rebuild the dimension structure completely rebuilds and constructs a
on the server for cubes that use the MOLAP, hybrid OLAP (HOLAP), and relational OLAP (ROLAP) storage modes
Before data can be loaded
into a cube, you must first
create and process the
dimensions of the cube
Key Point
Analysis Server creates
multidimensional OLAP
(MOLAP) dimension
structures in the Data folder
located on the server,
except in those cases when
you use ROLAP
dimensions Non-ROLAP
dimensional structures are
created on the server for
cubes that use the MOLAP,
hybrid OLAP (HOLAP), and
relational OLAP (ROLAP)
storage modes
Do not spend too much time
here describing dimension
rebuilds and incremental
updates because they are
discussed in detail later in
this section
Trang 15Shared Dimension Processing Mechanics
You can initiate the processing of a shared dimension in either of two ways:
! Expand the Shared Dimensions folder, right-click the dimension, and then click Process to display the Process a Dimension dialog box This interface
lets you choose between an incremental update and a dimension structure rebuild
! Right-click the Shared Dimensions folder and click Process All
Dimensions There is no choice about which type of process will occur
when you choose this option The Analysis Server determines the type of process applied to dimensions by determining which dimensions contain structure changes and which dimensions maintain their original structure
The Process Dialog Box
When you process a dimension in Analysis Manager, a Process dialog box
opens that steps through each of the processing phases The dialog contains the following information that you can use to troubleshoot errors or determine the success or failure of the process:
! Start time, end time, and process duration
! Number of RDBMS rows processed
! Initialization and committal information
! SQL statements performed on the RDBMS to access member and dimension data
! Information on the success or failure of the dimension build
Trang 16Rebuilding Dimensions
! Situations in which to Rebuild a Dimension
! Implications of Rebuilding a Dimension
reprocessed
The Rebuild the dimension structure option in the Process a Dimension
dialog box entirely recreates the dimension structure It is the most comprehensive method for processing dimensions
Situations in which to Rebuild a Dimension
The following situations require a rebuild of the dimension structure to reflect the structural dimension changes:
! Adding or deleting a level
! Deleting a member
! Renaming a member
! Moving a child from one parent to another This movement is commonly
called re-parenting For example, if you move a product from one business
unit to another, the dimensional structure must reflect the change
Implications of Rebuilding a Dimension
Rebuilding a dimension is not a minor action The following are implications of rebuilding a shared dimension:
! The Analysis Server erases and rebuilds the dimensional structure that is stored on the Analysis Server
! Cubes that depend on the given dimension are unavailable to clients until the cubes are reprocessed In other words, clients cannot connect to cubes that depend on a rebuilt dimension until the cubes are reprocessed
! The rebuilding of the dimensional structure can be a time-consuming process if the dimension contains an abundance of members
Topic Objective
To describe the process of
rebuilding a dimension
Lead-in
The Rebuild the
dimension structure option
entirely recreates the
dimension structure It is the
most comprehensive
method for processing
dimensions
Trang 17Incrementally Updating a Dimension
! Situations in which to Incrementally Update a Dimension
! Implications of Incrementally Updating a Dimension
The other option of the Process a Dimension dialog box is Incremental
update This option allows you to add members and member properties to a
shared dimension when no structural changes have occurred
Incremental updates do not force a reprocessing of the cube Therefore, perform incremental updates of dimensions instead of dimension rebuilds when
possible
Situations in which to Incrementally Update a Dimension
You can perform incremental updates in the following situations:
! Adding a member to a dimension
! Adding a member property to a dimension
Implications of Incrementally Updating a Dimension
Though the implications are not as severe as dimension rebuilds, it is still important to understand what happens when an incremental update occurs:
! Cubes that use the given dimension are available to clients during this process
! The dimension hierarchy reflects the member updates when the incremental update is complete
! Existing members are left intact
! New fact table data associated with the new members requires an
incremental cube update
When you process a cube, you have the option to incrementally update
Topic Objective
To describe dimension
incremental updates
Lead-in
Incremental updates allow
you to add members and
member properties to a
shared dimension when no
structural changes have
occurred
Note
Trang 18all shared dimensions found in the cube You do this by selecting the
Incrementally update the shared dimensions used in this cube check box
found in the Process a Cube dialog box
Trang 19Processing Private Dimensions
! Exist in Single Cubes
! Cannot Be Processed Independently
! Are Processed When The Cube Is Processed
You create and manipulate private dimensions in single cubes Because they exist in single cubes, you do not affect other cubes by processing private dimensions Therefore, you can isolate cube-processing needs by defining dimensions as private
You cannot process private dimensions without also processing the cubes in which they reside, and no options or commands exist that process private dimensions independently
There are two methods of processing private dimensions:
! Perform an incremental update or a refresh of a cube An incremental
update or a refresh of a cube performs an incremental update of all private dimensions in the cube In other words, an incremental update or a refresh
of a cube adds new members and member properties in private dimensions
in the cube
! Perform a full process of a cube A full process of a cube performs a rebuild
of all private dimensions in the cube In other words, a full process of a cube updates the structure and all members in private dimensions in the cube
For more information on cube refreshes and full processes, refer to the
next section in this module, Processing Cubes
Topic Objective
To discuss the processing of
private dimensions
Lead-in
In this section, you will learn
about private dimension
processing
Note
Trang 20Understanding ROLAP and Changing Dimensions
! ROLAP Dimensions
$ Store dimension data in dimension tables
$ Can support tens of millions of members
$ Force you to define their cubes as ROLAP cubes
$ Require SQL Server 2000 Enterprise Edition
$ Are also considered changing dimensions
! Changing Dimensions
$ Are optimized for frequent data source changes
$ Permit more types of changes with incremental updates
$ Include virtual, parent-child, and ROLAP dimensions
$ Are set within the Dimension Editor
When you create a dimension, its structure is stored, by default, in multidimensional structures on the Analysis Server computer You maintain its dimensional structure based on the processing rules presented in the preceding pages of this section These dimensions are considered MOLAP dimensions
Alternatively, you can define dimensions as ROLAP dimensions to allow for millions of members in your dimension, or you can create changing dimensions
to allow for more frequent changes to the dimension structure
ROLAP Dimensions
A ROLAP dimension’s data is stored in the dimension table or tables
Therefore, there is no need to build the multidimensional dimension structures that MOLAP dimensions create on the Analysis Server
By defining a dimension as ROLAP, you can maintain a dimension with tens of millions of members If you attempt to store tens of millions of members in a MOLAP dimension, you receive errors when you process the dimension Because of the query performance degradation you receive when using ROLAP dimensions, you usually define a dimension as ROLAP only if the dimension contains millions of members
When you add a ROLAP dimension to a cube, the cube must use the ROLAP option for its cube storage mode You are not given the option to define the cube as MOLAP or HOLAP in the Storage Design Wizard
ROLAP dimensions require SQL Server 2000 Enterprise Edition
All dimensions that use the ROLAP storage mode are also considered to be
Trang 21Changing Dimensions
A changing dimension is optimized for frequent changes It allows certain types
of changes to be made by using incremental updates instead of rebuilding the dimension and fully processing the cube Therefore, users can access the cubes without interruption when making these changes
The following types of dimensions are always changing dimensions:
! Virtual dimensions
! Parent-child dimensions
! ROLAP dimensions
You can define any dimension as changing by setting its Changing property to
True in the Properties pane of the Dimension Editor or Cube Editor
In a changing dimension, because aggregations are not stored at intermediate dimension levels, levels and members below the top level and above the bottom level of the dimension can be added, moved, changed, or deleted, and an incremental update applies the changes when you save the dimension You do not need to rebuild the dimension, a process that makes the cube unavailable to clients during the rebuild process
Changing dimensions provide for more flexibility in updating dimension structures However, queries that use changing dimensions are slower than queries that use non-changing dimensions
For more information on ROLAP and changing dimensions, see SQL Server Books Online
Note
Trang 22Demonstration: Rebuilding the State Dimension
In this demonstration, you will learn how to rebuild the State dimension and will see the impacts to the Sales Units cube after the rebuild
Topic Objective
To demonstrate how to
rebuild a dimension
Lead-in
In this demonstration, you
will learn how to rebuild the
State dimension and will
see the impacts to the Sales
Units cube after the rebuild
Delivery Tips
The steps for this
demonstration are included
in the Instructor Notes
Trang 23# Processing Cubes
! Cube Processing Overview
! The Full Process
! Refreshing a Cube
! Incrementally Updating a Cube
! The Incremental Update Wizard
! Processing Options
After you design a cube, you must process the cube to populate it with data MOLAP cubes, ROLAP cubes, and HOLAP cubes all require processing There are three different processes for cubes, the mechanics and logic of which are described in the next section
Topic Objective
To introduce cube
processing
Lead-in
After you design a cube, you
must process the cube to
populate it with data
The topics in this section are
very complex If students
are confused, tell them that
the following labs contain
exercises that include each
of the processing types
Trang 24Cube Processing Overview
! Cube Processing Mechanics
! Using the Process Dialog Box
An OLAP cube is a fast and flexible representation of the information stored in
a data warehouse When the information in the data warehouse changes, you must update the cube so that the data in the cube is accurate Updating an OLAP cube to accurately represent the relational data warehouse is called
processing the cube Different types of changes can occur in the data
warehouse, and the Analysis Server provides different techniques for synchronizing the OLAP cube with the relational data warehouse
Cube Processing Mechanics
To initiate cube processing, right-click a cube and then click Process to display the Process a Cube dialog box Here, you decide if you want to perform an
incremental update, a data refresh, or a full process
Using the Process Dialog Box
When you process a cube in Analysis Manager, the process dialog box opens with processing information This is the same dialog you saw earlier when processing dimensions However, there are more steps documented These include:
! Start time, end time, and duration of entire process, as well as the times and duration of each of the steps of the process
! Number of RDBMS rows processed at each step
! Initialization and committal information
! SQL statements used to access data from the RDBMS
! Statistics on aggregations created
! Information on the success or failure of the process
Topic Objective
To introduce the mechanics
of cube processing
Lead-in
To contain accurate data, a
cube must be processed
when the data in the data
warehouse changes
Trang 25The Full Process
! Situations in which to Perform a Full Process
$ The cube is new
$ A dimension is added or deleted
$ A dimension is rebuilt
$ A measure is added, deleted, or modified
! Implications of Performing a Full Process
$ Cube data, including aggregations, is erased and rebuilt
$ Dependent virtual cubes become unavailable until reprocessed
$ Partition data is read into the cube from the data source
$ Private dimensions and changed shared dimensions are rebuilt
A full process is the most comprehensive cube process you can perform To
initiate a process, click the third option in the Process a Cube dialog box All
cube structures and cube data is rebuilt
Situations to Perform a Full Process
Because a full process is the most time consuming method of processing, it is important to understand the situations that require a full process These include:
! Creating a new cube
! Adding or deleting dimensions
! Rebuilding any shared dimension belonging to the cube
! Adding, deleting, or modifying cube measures
Implications of Performing a Full Process
The following are important implications of performing a full process on a cube:
! If the cube is MOLAP, it is erased and rebuilt
! Regardless of cube storage—MOLAP, ROLAP, or HOLAP—aggregations are erased and rebuilt
! Any virtual cubes based on the cube are unavailable after the process until they are reprocessed themselves
! All partition data is read into the cube from the RDBMS data sources
! All private dimensions are rebuilt
Topic Objective
To describe when to
perform a full process and
the implications of doing so
Trang 26! If a shared dimension belonging to the cube has been modified structurally and needs to be rebuilt, the dimension will automatically rebuild when the cube is processed All other cubes that use the same shared dimension will not be available again until they have each been reprocessed
! If an error occurs, the operation is rolled back
Trang 27Refreshing a Cube
! Situations in which to Refresh a Cube
! Implications of Refreshing a Cube
Refreshing a cube erases all data and repopulates the cube by reading the data from the RDBMS data source The cube structure does not change when you perform a cube refresh
Situations in which to Refresh a Cube
A cube can be refreshed in the following situations:
! The source data of a cube has changed in the RDBMS but the structure of the cube is the same
! An incorrectly performed incremental update causes cube data to be duplicated
Implications of Refreshing a Cube
Although a cube refresh is not as major a procedure as a full process, it is still important to understand the implications of refreshing a cube:
! If the cube is MOLAP, the detailed data is erased and the cube is repopulated from the source RDBMS
! All aggregations are cleared and recalculated
! Shared dimension structures are unchanged, and private dimensions are incrementally updated
! The original cube is available to clients during the refresh Once the refresh
is complete, clients see the new data
! Virtual cubes based on the cube are available to clients during the refresh
! If an error occurs, the operation is rolled back
Topic Objective
To describe when to refresh
a cube and the implications
of doing so
Lead-in
Refreshing a cube erases all
data and repopulates the
cube by reading the data
from the RDBMS data
source
Tell students that duplication
of data due to an incorrectly
performed incremental
update will be discussed in
the next section
Trang 28Incrementally Updating a Cube
! Situations in Which to Perform an Incremental Update
fact table
from a different fact table
not changed
changed
! Implications of Incrementally Updating a Cube
MOLAP cubes
ROLAP and HOLAP cubes
used
An incremental update is the process by which you add new data to a cube on a periodic basis It is the least time-consuming method of processing a cube because it retains the existing data in the cube and adds only the data you select However, you must understand the mechanics of cube incremental updates to avoid incorrectly duplicating data
Situations in Which to Perform an Incremental Update
Incremental updates can occur if the following are true:
! New data is added to the fact table
! New data is needed temporarily from a different fact table
To include data from a different fact table permanently, create a new
partition in the cube For information on partitions, see module 10,
“Managing Partitions,” in course 2074A, Designing and Implementing
OLAP Solutions with Microsoft SQL Server 2000
! The underlying source data has not changed
! There are no structural changes made to cubes, partitions, or dimensions
Topic Objective
To describe when to
incrementally update a cube
and the implications of doing
so
Lead-in
An incremental update is the
process by which you add
new data to your cube on a
periodic basis
Key Point
The Incremental Update
Wizard cannot determine
new fact table data
Therefore, you must define
what is new in the data
source If you incorrectly
define new data, you risk
creating incorrect values in
the cube
Note
Trang 29Implications of Incrementally Updating a Cube
An incremental update produces the following results:
! For MOLAP cubes, new detailed data is imported into the cube—old data is unaffected
! For ROLAP and HOLAP cubes, since detailed data is already stored in the source RDBMS, there is no movement of detailed data
! For all storage options—MOLAP, ROLAP, and HOLAP—aggregations are updated
! Private dimensions included in the cube are incrementally updated
! Clients can work with the cube and dependent virtual cubes while the incremental update is in process Once completed, clients see new data
! If an error occurs, the operation is rolled back
! You can define a different fact table in the Incremental Update Wizard By defining a different fact table, you add the data in the new fact table to the existing cube data
! Filters can be defined in the Incremental Update Wizard to further specify the data to be loaded into your cube Filters are SQL statements that are passed to your RDBMS
The Incremental Update Wizard does not have a method for determining new fact table data Therefore, you must define what is new in the data source By incorrectly defining new data, you risk creating incorrect values
in your cube
Important
Trang 30The Incremental Update Wizard
! Specifying the Data Source
! Specifying the Filter Expression
! Understanding Filters
By clicking Incremental update as your processing method, the Incremental
Update Wizard appears
This wizard allows you to specify exactly where the new data is coming from
In cubes containing multiple partitions, you define which partition is to be updated
You can also define a filter to specify exactly what data from a fact table will be loaded into your cube
Incremental updates to cubes are made simple in Analysis Services with the Incremental Update Wizard The wizard takes you through the setup of an incremental update This section describes each of the steps
Specifying the Data Source
The first step when performing an incremental cube update is to specify where the new data comes from:
1 Click Change to display the Choose a Fact Table dialog
The available data sources are listed in the left pane Only the data sources that have been defined previously in the current Analysis Server database are listed
2 Expand the data source to display the tables and then choose the fact table containing the incremental data
The columns belonging to the selected table are displayed in the right pane This is for information purposes only
Topic Objective
To introduce the
Incremental Update Wizard
Lead-in
The Incremental Update
Wizard allows you to specify
exactly where the new data
is coming from
Delivery Tip
Open the Incremental
Update Wizard by
right-clicking a cube and right-clicking
Process Click Incremental
Update and then click Next
Step through the wizard to
describe the required
components of an
incremental update, but do
not click Finish at the end of
the wizard
Trang 31Specifying the Filter Expression
Having chosen a database and fact table, the next step is to specify the filter expression in the form of an SQL WHERE expression This is done without explicitly including the keyword WHERE
The filter expression determines which rows from the fact table will be imported into the cube
Here is the basic syntax of the filter expression:
Understanding Filters
This is what happens behind the scenes when you use a filter:
! The expression you enter becomes part of a WHERE clause
! The WHERE clause in turn is part of an SQL SELECT statement
! The SQL statement passes through to the particular relational database without a syntax check by Analysis Server
Trang 32Processing Options
! Source Table Filter
! Processing Optimization Mode
! Stop Processing on Key Errors
! Key Error Limit
! Key Error Log File
! Processing Log File
You have access to several properties that affect cube and dimension processing In addition, you can enable log files that store processing information and errors You set the properties and log files in Analysis Manager
Source Table Filter
In the Cube and Dimension Editors, you can set the Source Table Filter property for cubes and dimensions The Source Table Filter property contains
an expression included in the WHERE clause of the SQL query that filters the data loaded into the cube or dimension The expression that you add is an expression used in the WHERE clause, without explicitly including the command WHERE
For example, to include only the Canada member and its descendants in a dimension, type the following in the dimension’s Source Table Filter:
“store”.”store_country” = ‘Canada’
You set the Source Table Filter in the Advanced tab of the Properties pane in the Cube Editor or the Dimension Editor In the Cube Editor, the Source Table
Filter limits fact table records included in the cube In the Dimension Editor,
the Source Table Filter limits members included in the dimension
The Source Table Filter box does not check the syntax of the expression
Always verify that the syntax you enter to define the filter is correct
so that you do not produce duplicated data
Topic Objective
To describe available cube
and dimension processing
properties
Lead-in
You have access to several
properties that affect cube
and dimension processing
Delivery Tip
Switch to Analysis Manager,
and show students how to
access each property as
you describe it
Caution