Академический Документы
Профессиональный Документы
Культура Документы
Course Guide
Version: ADVPD-901-Jan11-CG
20002011 MicroStrategy Incorporated. All rights reserved.
This Course (course and course materials) and any Software are provided as is and without express or limited
warranty of any kind by either MicroStrategy Incorporated (MicroStrategy) or anyone who has been involved in the
creation, production, or distribution of the Course or Software, including, but not limited to, the implied warranties of
merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the Course
and Software is with you. Should the Course or Software prove defective, you (and not MicroStrategy or anyone else
who has been involved with the creation, production, or distribution of the Course or Software) assume the entire cost
of all necessary servicing, repair, or correction.
In no event will MicroStrategy or any other person involved with the creation, production, or distribution of the Course
or Software be liable to you on account of any claim for damage, including any lost profits, lost savings, or other
special, incidental, consequential, or exemplary damages, including but not limited to any damages assessed against or
paid by you to any third party, arising from the use, inability to use, quality, or performance of such Course and
Software, even if MicroStrategy or any such other person or entity has been advised of the possibility of such damages,
or for the claim by any other party. In addition, MicroStrategy or any other person involved in the creation, production,
or distribution of the Course and Software shall not be liable for any claim by you or any other party for damages
arising from the use, inability to use, quality, or performance of such Course and Software, based upon principles of
contract warranty, negligence, strict liability for the negligence of indemnity or contribution, the failure of any remedy
to achieve its essential purpose, or otherwise.
The Course and the Software are copyrighted and all rights are reserved by MicroStrategy. MicroStrategy reserves the
right to make periodic modifications to the Course or the Software without obligation to notify any person or entity of
such revision. Copying, duplicating, selling, or otherwise distributing any part of the Course or Software without prior
written consent of an authorized representative of MicroStrategy are prohibited.
U.S. Government Restricted Rights. It is acknowledged that the Course and Software were developed at private
expense, that no part is public domain, and that the Course and Software are Commercial Computer Software and/or
Commmercial Computer Software Documentation provided with RESTRICTED RIGHTS under Federal Acquisition
Regulations and agency supplements to them. Use, duplication, or disclosure by the U.S. Government is subject to
restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at
DFAR 252.227-7013 et. seq. or subparagraphs (c)(1) and (2) of the Commercial Computer SoftwareRestricted Rights
at FAR 52.227-19, as applicable. The Contractor is MicroStrategy, 1850 Towers Crescent Plaza, Vienna, Virginia 22182.
Rights are reserved under copyright laws of the United States with respect to unpublished portions of the Software.
Trademark Information
All other company and product names may be trademarks of the respective companies with which they are associated.
Specifications subject to change without notice. MicroStrategy is not responsible for errors or omissions.
MicroStrategy makes no warranties or commitments concerning the availability of future products or versions that
may be planned or under development.
Patent Information
This product is patented. One or more of the following patents may apply to the product sold herein: U.S. Patent Nos.
6,154,766, 6,173,310, 6,260,050, 6,263,051, 6,269,393, 6,279,033, 6,567,796, 6,587,547, 6,606,596, 6,658,093,
6,658,432, 6,662,195, 6,671,715, 6,691,100, 6,694,316, 6,697,808, 6,704,723, 6,741,980, 6,765,997, 6,768,788,
6,772,137, 6,788,768, 6,798,867, 6,801,910, 6,820,073, 6,829,334, 6,836,537, 6,850,603, 6,859,798, 6,873,693,
6,885,734, 6,940,953, 6,964,012, 6,977,992, 6,996,568, 6,996,569, 7,003,512, 7,010,518, 7,016,480, 7,020,251,
7,039,165, 7,082,422, 7,113,993, 7,181,417, 7,127,403, 7,174,349, 7,194,457, 7,197,461, 7,228,303, 7,260,577, 7,266,181,
7,272,212, 7,302,639, 7,324,942, 7,330,847, 7,340,040, 7,356,758, 7,356,840, 7,415,438, 7,428,302, 7,430,562,
7,440,898, 7,486,780, 7,509,671, 7,516,181, 7,559,048, 7,574,376, 7,617,201, 7,725,811, 7,801,967, 7,836,178, 7,861,161
and 7,861,253. Other patent applications are pending.
How to Contact Us
Course Description
Project architects
Course Prerequisites
Before starting this course, you should know all topics
covered in the following courses:
Follow-up Courses
After taking this course, you might consider taking the
following courses:
Related Certifications
This course does not have any recommended follow-up
certifications.
Course Objectives
After completing this course, you will be able to:
Content Descriptions
Each major section of this course begins with a Description
heading. The Description introduces you to the content
contained in that section.
Learning Objectives
Learning objectives enable you to focus on the key knowledge
and skills you should obtain by successfully completing this
course. Objectives are provided for you at the following three
levels:
Lessons
Each lesson sequentially presents concepts and guides you
with step-by-step procedures. Illustrations, screen examples,
bulleted text, notes, and definition tables help you to achieve
the learning objectives.
Review
Case Study
Business Scenario
Exercises
Typographical Standards
Following are explanations of the font style changes, icons,
and different types of notes that you see in this course.
Actions
Code
Sum(Sales)/Number of Months
Data Entry
Keyboard Keys
Press CTRL+B.
New Terms
New terms to note are in regular italic font style. These terms
are defined when they are first encountered in the course.
The following example shows this style:
Heading Icons
Precedes Exercises
MicroStrategy Courses
Core Courses
Implementing MicroStrategy: Development and
Deployment
MicroStrategy Administration
All courses are subject to change. Please visit the MicroStrategy Web site for the lat-
est education offerings.
Lesson Description
In this lesson, you will first review the project design process
and learn about the tools and components that enable you to
manage the project schema. Next, you will review the basic
schema objects that you can create in MicroStrategy
Architect. Finally, you will learn about additional schema
objects that enable you to perform advanced functions.
Lesson Objectives
After completing the topics in this lesson, you will be able to:
You need to have a solid design for the logical data model and
data warehouse schema before you move on to creating the
actual project. Both of these components can directly affect
how you query data in a project, what data you can query,
how fast queries run, and so forth.
Lesson Summary
In this lesson, you learned:
Lesson Description
Lesson Objectives
After completing the topics in this lesson, you will be able to:
Define a data mart, and list and define data mart objects;
create a data mart table by creating and executing a data
mart report; list and define data mart column creation
options; use a data mart table in a project. (Page 46)
Ifauthentication
you are using security features such as warehouse
or connection mapping, different users
may access the same data warehouse using different
DSNs or logins. However, even in these cases, the
project database instance is still associated with a
default DSN and login.
Aggregation Awareness
Iffactthetable,
aggregate fact table structure matches the base
MicroStrategy Architect can automatically
map the new table to existing attributes and facts as
long as automatic mapping is used for the
corresponding attribute form expressions and fact
expressions.
Logical table size is the sum of the weight for each attribute
contained in the table. Attribute weight is defined as the
position of an attribute in its hierarchy divided by the number
of attributes in the hierarchy multiplied by a factor of 10.
Therefore, using this formula, MicroStrategy Architect
calculates the respective weight of each attribute as shown in
the illustration above. Then, the logical table size of each fact
table is simply the sum of their respective attribute weights.
You can view the logical table size for each table in the Logical
Table Editor. When the SQL Engine can obtain data from two
or more tables in the warehouse, it looks at the logical table
size and generates SQL against the table with the smallest
logical table size. This process helps the SQL Engine select
the optimal table for a query.
At times, you may need to reassign the logical table size for a
table. For example, in the previous illustration for logical
table sizes, there are two aggregate fact tables that both have
the same logical table size of 15. However, one of these tables
contains item and region information, and the other one has
class and store information. Clearly, based on the attributes
they contain, the table with item and region information is
larger. There are many more items than classes to which
items belong. In this example, where the logical table size is
the same but the physical size is actually very different, you
can change the logical table size automatically assigned by
MicroStrategy Architect.
Using the Table Editor, you can change the logical size for an
individual table. This procedure works fine if you are
changing the logical size of just a few tables. However, it is
tedious if you have to change the logical size for a number of
tables. Alternatively, you can use the Logical Size Editor. This
editor provides a single interface for you to change the logical
size of any table in a project.
5 When you have changed the logical sizes for all the
desired tables, on the File menu, select Save.
Data Marts
Creating tables for very large result sets and then using
other applications such as Microsoft Excel or Microsoft
Access to access the data
In this lesson, you will use data marts to create aggregate fact
tables.
When you click Yes, the Database Instances editor for the
data mart database instance opens with the Advanced tab
automatically selected.
3 Click OK.
Why Optimize?
When you create the data mart in the same data warehouse,
MicroStrategy Intelligence Server creates the data mart table
in the project warehouse and then inserts the result data rows
directly into the table.
3 In the Table name box, type the name of the data mart
table you want to create.
!U user name
!O report name
!j job ID
!r report GUID
!t timestamp
!p project name
!z project GUID
9 Execute the data mart report to create the data mart table.
You can then convert this report into a data mart. The
following image shows the Report Data Mart Setup Window
with data mart report configured as
REGION_YEAR_FORECAST_UNIT_SALES table in the
Forecast Data database instance:
Report Data Mart Setup Window
A data mart table has the same structure as any other data
warehouse table. By default, it contains columns
corresponding to all attribute forms and metric columns
present on the report template.
Attribute Columns
Consider the data mart report from the previous example that
has the Region and Year attributes and the Forecast Units
Sold metric on the template. Assuming that the default
display for the Region attribute is ID and description, and for
Year is ID, when the data mart report is executed, the data
mart table contains the following columns:
REGION_ID
REGION_NAME
YEAR_ID
WJXBFS1
9 Click the lower < button to remove the non-ID forms from
the report objects.
10 Click OK.
Using the previous example, after you change the display for
the Region attribute from description to ID only, and then
execute the data mart report, the data mart table contains the
following columns:
REGION_ID
YEAR_ID
WJXBFS1
3 In the Data type drop-down list, select the data type and,
if appropriate, define other relevant parameter setting(s).
Using the same example, after you change the column alias
for the Forecast Revenue metric, and then execute the data
mart report, the data mart table contains the following
columns:
REGION_ID
YEAR_ID
Total_Unit_Sales
Ifsame
the fact column in the Data Mart table is named the
as the underlying fact, you may select the
Automatic mapping method for the new fact
expression. By default, when you create a data mart
table, the fact has a unique name that is different than
the other facts in the project.
After you add the data mart table to a project and update the
appropriate fact object, you must also update the schema
logical information in the metadata.
Exercises: Managing Project Schema
Overview
Later in the course, you will also bring this data mart
table into the MicroStrategy Tutorial project using
MultiSource option.
Before you create a data mart, you will first modify the
Forecast Revenue metric to use a custom Forecast_Revenue
column alias. You will then create a data mart report with
Region ID and Quarter ID attribute forms on the template
and the Forecast Revenue metric. Name the data mart table
REGION_FORECAST_SALES. Save the data mart report as
Regional Forecast Revenue in the Public Objects\Reports
folder.
Next, you will add the table to the Forecasting Project. Then,
you will create a new fact expression for the Forecast Revenue
fact that uses the Forecast_Revenue column in the
REGION_FORECAST_SALES table. You will also create
and run a Data Mart Test report with the Region attribute
and the Forecast Revenue metric on the template to
confirm that the Forecast Revenue fact uses the
REGION_FORECAST_SALES table.
Finally, you will change the logical table size for the
REGION_FORECAST_SALES table to 30 and run the Data
Mart Test report to view the impact of your change on the
report SQL.
Detailed Instructions
15 Click the upper < button to remove the DESC form from
the Displayed forms list.
17 Click the lower < button to remove the DESC form from
the Report objects forms list.
23 Click the upper < button to remove the DESC form from
the Displayed forms list.
25 Click the lower < button to remove the DESC form from
the Report objects forms list.
26 Click OK.
30 Click OK.
42 Run the report. The result set should look like the
following:
43 Switch to the SQL View for the report. The SQL should
look like the following:
When you select this check box, when you update the
schema, the logical size for this table will not be
recalculated.
Test the change of the logical table size on the report SQL
Overview
You will use the Number data type and type the following
values in the PRODUCT_ID column:
Detailed Instructions
7 Press ENTER.
9 Click Save.
12 Click Save.
Lesson Summary
In this lesson, you learned:
Base fact tables are tables that store a fact or set of facts at
the lowest possible level of detail. Aggregate fact tables are
tables that store a fact or set of facts at a higher, or
summarized, level of detail.
You can change the logical table size either in the Logical
Table Editor or in the Logical Size Editor.
Lesson Description
Lesson Objectives
After completing the topics in this lesson, you will be able to:
In this example, the two fact tables each map to only one
database. The primary database instance for the
REGION_SALES table is the Sales Data Warehouse. The
primary database instance for the FORECAST_SALES table
is the Forecast Data Warehouse.
After selecting the optimal data source for a fact, the Engine
also has to select the best source for any corresponding
attributes. The Engine uses the following logic to select the
optimal data source for an attribute:
BigDecimal BigDecimal
Binary Binary
CellFormatData CellFormatData
LongVarBin LongVarBin
LongVarChar LongVarChar
NChar NChar
Numeric Decimal, Numeric, Integer with
scale of 0
NVarChar NVarChar
Unsigned Unsigned
VarBin VarBin
IfEngine
two columns do not have compatible data types, the
cannot join data using those columns.
These
same.
two data type definitions may not always be the
You can obtain the region data from either data warehouse.
However, revenue data is available only in the Sales Data
Warehouse, and forecast revenue data is available only in the
Forecast Data Warehouse.
Filtering Qualifications
You may also have reports where you need to filter data from
one data source by qualifying on data that comes from
another data source.
You can have this same scenario with other types of filter
qualifications. The following image shows an example that
involves an attribute qualification:
Attribute Qualification
These cases are just a few examples of how you can use
MultiSource Option to combine data from multiple sources in
a single report. You can use MultiSource Option to help meet
a variety of reporting needs, including the following:
Injoining
this lesson, you will analyze two scenarios for
data from multiple sources. One scenario uses
the aggregate fact table and generates a relatively
simple SQL statement. The second scenario uses the
base fact table, and therefore generates a more
complex SQL statement.
In the sample scenario, there are many tables that map only
to Tutorial Data, which is the primary database instance for
the project. These tables are already part of the project.
However, there are two tables that map to a data source other
than Tutorial Data:
Table with a Single Data Source
OR
Click OK.
In the sample scenario, there are two tables that map to both
data sources:
Tables with Multiple Data Sources
IfName>
you click the Make no changes to <Table
option, the table is not mapped to the
selected database instance, and no duplicate table
is created.
OR
The following image shows the warning you see when you
add duplicate tables:
Duplicate Tables Warning
OR
Click OK.
IfName>
you click the Make no changes to <Table
option, the table is not mapped to the
selected database instance, and no duplicate table
is created.
OR
For example, in the sample scenario, there are two tables that
map to both data sources:
Tables with Multiple Data Sources
6 Click OK.
9 Click OK.
Inyouthemade
Properties pane, you should see the changes
reflected in the database instances
associated with the Primary DB Instance and
Secondary DB Instances properties.
Ifprimary
the database instance you want to remove is the
database instance, you have to change the
primary database instance first. This action removes
the association between the database instance and the
table.
Ifmapping
you have attributes that do not use the Automatic
method, you have to manually map the
duplicate tables to the corresponding attributes.
Forecast_Revenue
In this report, you can obtain data for the Region attribute
from either the Tutorial Data or Forecast Data data
warehouses. You can obtain data for the Revenue metric only
from Tutorial Data. You can obtain data for the Forecast
Revenue metric only from Forecast Data.
Based on the logic the Engine uses to select the optimal data
source for each pass, it moves data between the two
databases to process the query.
The following images show the primary SQL passes for the
sample report and explain what happens in each pass.
This first image shows the SQL passes the Engine uses to
calculate the Revenue metric in the report:
SQL for Calculating the Revenue Metric
This second image shows the SQL passes the Engine uses to
calculate the Forecast Revenue metric in the report:
SQL for Calculating the Forecast Revenue Metric
Now that the Engine has calculated all the metrics for the
report, it uses Tutorial Data to obtain the region descriptions
and consolidate the results of both metric calculations.
Toperforms
minimize the movement of data, the Engine
the final consolidation pass using the
database instance in which the most temporary tables
were created while processing the report. In this
example, both temporary tables were created in the
Tutorial Data database instance, so the Engine selects
the primary database instance.
Ifinstances,
there is a tie between two or more database
the Engine selects the primary database
instance for the project. If none of them are the
primary database instance for the project, the Engine
selects the database instance with the smallest GUID
(alphabetically).
This last image shows the SQL pass the Engine uses to
produce the final result set for the report:
SQL for Consolidating the Result Set
The following image shows the result set for the report:
Result Set for Sample Report
FORECAST_QTY_SOLD * (FORECAST_UNIT_PRICE
- FORECAST_DISCOUNT)
You then have to remove the fact expression that points to the
REGION_FORECAST_SALES aggregate table from the fact
definition. The following image shows the Forecast Revenue
fact mapped to the FORECAST_SALES table:
Mapping of Forecast Revenue Fact
When you now run the sample report to retrieve the forecast
data, the Engine must aggregate the forecast data from the
employee level to the region level. The process of determining
the relationship between these two attributes takes place in
the report SQL.
The following images show the primary SQL passes for the
sample report and explain what happens in each pass.
This first image shows the SQL passes the Engine uses to
calculate the Revenue metric in the report:
SQL for Calculating the Revenue Metric
This second image shows the SQL passes the Engine uses to
determine the relationships between call centers and
employees:
SQL for Determining Call Center and Employee
Relationships
The first SQL pass selects the call centers and employees
from Tutorial Data. The second SQL pass creates a temporary
table in Forecast Data in which to store the call centers and
employees. The third SQL pass inserts the call centers and
employees from Tutorial Data into the temporary table in
Forecast Data.
This third image shows the SQL passes the Engine uses to
determine the relationships between regions and call centers:
SQL for Determining Region and Call Center Relationships
The first SQL pass selects the regions and call centers from
Tutorial Data. The second SQL pass creates a temporary table
in Forecast Data in which to store the regions and call
centers. The third SQL pass inserts the regions and call
centers from Tutorial Data into the temporary table in
Forecast Data.
This fourth image shows the SQL passes the Engine uses to
calculate the Forecast Revenue metric in the report:
SQL for Calculating the Forecast Revenue Metric
Now that the Engine has calculated all the metrics for the
report, it uses Tutorial Data to obtain the region descriptions
and consolidate the results of both metric calculations.
This last image shows the SQL pass the Engine uses to
produce the final result set for the report:
SQL for Consolidating the Result Set
The following image shows the result set for the report:
Result Set for Sample Report
Exercises: Using MicroStrategy MultiSource
Option
You should complete the following exercises using the
MicroStrategy Tutorial project, which is found in the
MicroStrategy Analytics Modules project source.
Overview
LU_PRODUCT
LU_SUBCATEG
After you have completed these tasks, save and close the
Warehouse Catalog and update the project schema.
Detailed Instructions
9 Click OK.
Overview
Detailed Instructions
4 Create the DESC form for the Product attribute and map
it to the PRODUCT_DESC column in the LU_PRODUCT
table.
Overview
Run the report. The result set should look like the following:
Detailed Instructions
Follow-up Questions
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
3 Which table does the Engine use to apply the report filter
and determine which categories belong to Entertainment?
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
_______________________________________
Lesson Summary
In this lesson, you learned:
Lesson Description
This lesson describes the various ways you can extend fact
levels using MicroStrategy Architect.
In this lesson, you will first learn about the three types of fact
level extensionsdegradation, extension, and disallow. Then,
you will learn how to create each of these types of fact level
extensions.
Lesson Objectives
After completing the topics in this lesson, you will be able to:
Itattribute
is possible for the same fact to be stored at different
levels within a hierarchy. For example, you
could have another fact table that stores unit sales by
item and date, rather than item and week. This fact
table would store unit sales for items at a lower level
within the Time hierarchy.
Based on this fact table, you can report on unit sales at the
item or week levels. You can also aggregate the unit sales data
to the month, quarter, or year levels within the Time
hierarchy and to the subcategory and category levels within
the Product hierarchy. However, you cannot create a report
that shows unit sales by date because the fact is stored at the
higher level of week. You cannot determine the unit sales at
the date level using this fact table.
The Unit Price fact is stored at the item and week levels, while
the Quantity Sold fact is stored at the item and day levels.
However, for these two facts to be used together in a metric
expression, they must be stored at the same level. Otherwise,
the calculation can cause errors, depending on the level at
which you need to report on the metric.
As you can see, the levels at which facts are stored limit the
levels at which you can report on facts. If you have a metric
that consists of multiple facts, they have to be stored at the
same level to correctly calculate the metric.
The error message notifies users that the Units Received fact
is not available at the day and item levels. For this report to
work, you need to lower the level of the Units Received fact
from month to day using a fact degradation.
Ascouldan change
alternative to creating a fact degradation, you
the level of the fact table in the data
warehouse itself. However, changing the fact table is
not always an option. The fact data may not be
captured at that level in the source system, or there
may be other organizational or environmental
restrictions on changing the table structure.
2 Select the attribute the SQL Engine can use to join the fact
to the attribute to which you want to lower the fact.
After you select the join attribute you want to use to relate the
desired attribute and fact, you have to determine how you
want the SQL Engine to perform the join between the join
attribute and the fact. There are two possible join directions.
You can join to the fact using only the join attribute itself, or
you can allow the fact to also join to children of the join
attribute.
Ifattribute
you allow the SQL Engine to join against the join
and any of its children, you need to ensure
that the allocation expression you use for the fact
degradation returns values that are valid at any of
those attribute levels.
Some facts are static and do not change value from one level
to another. Such facts do not require an expression to allocate
the fact at the lower level. Other facts do change from one
level to another, and you need to define an expression that
correctly allocates the fact data at the lower level. An
allocation expression can include attributes, facts, constants,
and any standard expression syntax, including mathematical
operators, pass-through functions, and so forth.
8 Click Next.
10 Click Next.
12 Click Next.
14 Click Next.
OR
16 Click Next.
When you run a report with the Item and Day attributes and
the Units Received metric on the template, the report returns
the following result set:
Report Result Set with the Fact Degradation
The image above displays only the first few rows of the
result set for the report.
The report returns the same value for each day within the
same month for the Units Received metric.
In this data model, you store the Freight fact at the employee,
order, and day level. However, freight data is not stored at the
item level. The Freight fact is not related to any attribute in
the Product hierarchy.
The image above displays only the first few rows of the
result set for the report.
The report returns the same freight value for each item. This
result set is meaningless because of how the query joins the
lookup table for the Item attribute and the fact table for
Freight. The following image shows the SQL for this report:
Item and FreightReport SQL
Ascouldan add
alternative to creating a fact extension, you
a new level to the fact table in the data
warehouse itself. However, changing the fact table is
not always an option. The fact data may not be
captured at that level in the source system, or there
may be other organizational or environmental
restrictions on changing the table structure.
2 Select the table you want the SQL Engine to use to join the
fact to the attribute to which you want to extend the fact.
The SQL Engine needs to join the table that contains the fact
you are extending and the lookup table that stores the
attribute to which you are extending the fact. Because these
two tables are not related, you have to select another data
warehouse table to serve as a relationship table between the
fact and lookup tables.
After you select the attribute to which you want to extend the
fact, MicroStrategy Architect searches the project warehouse
catalog and returns a list of all tables that contain the ID
column of that attribute. Using this list of candidate tables,
you can then select the optimal table for the join. In selecting
a table, you should consider several factors, including the
number of possible join paths, the optimal join path for a
given allocation expression, and any other characteristics
specific to your data warehouse environment. For example,
you may want to use a table for the join that you know has
better indexes or is updated more frequently.
The remaining tables are all fact tables that contain the Item
attribute. However, most of them have only one or two
attributes in common with the ORDER_FACT table.
However, the ORDER_DETAIL table contains many of the
same attributes as the ORDER_FACT table, including
Employee, Day, Customer, and Order. The following image
shows the logical view for the ORDER_DETAIL table:
ORDER_DETAIL TableLogical View
After you select the table for the join, you then need to select
an attribute or set of attributes from that table on which the
SQL Engine should join. MicroStrategy Architect lists any
attributes whose ID columns are present in the join table.
You can either manually select the join attributes, or you can
allow the SQL Engine to select the join attributes dynamically
on a query-by-query basis.
For the Freight fact extension, you select Order as the join
attribute. You could use other attributes in the
ORDER_FACT table as the join attribute. These attributes
are listed in the Level Extension Wizard, as shown below:
Possible Join Attributes
If you allow the SQL Engine to join against the join attributes
and any of their children, you need to ensure that the
allocation expression you use for the fact extension returns
values that are valid at any of those attribute levels.
For the Freight fact extension, you allow the SQL Engine to
join only against the Order attribute itself. Since the Order
attribute is already the lowest-level attribute in the
Customers hierarchy, it does not have any child attributes
you could use to join to the fact.
For the Freight fact extension, you could create the following
allocation expression:
(Freight * [Item-level Units Sold]) /
[Order-level Units Sold]
8 Click Next.
10 Click Next.
12 Click Next.
14 Click Next.
OR
16 Click Next.
IfAttributes
you chose to select the join attributes, the Join
Direction window opens. Continue to
step 17. If you chose to let the SQL Engine
determine the join attributes, the Allocation
window opens. Continue to step 19.
18 Click Next.
OR
20 Click Next.
You can then run the following report that displays invoice
information for all items in a particular order:
Invoice ReportFreight at the Item Level
2 Select a fact that maps to the tables you want the SQL
Engine to use to join the fact to the attribute to which you
want to extend the fact.
The SQL Engine needs to join the table that contains the fact
you are extending and the lookup table that stores the
attribute to which you are extending the fact. Because these
two tables are not related, you have to use another data
warehouse table to serve as a relationship table between the
fact and lookup tables. The major difference between the
table and fact relation methods is that instead of directly
selecting a table to use for this join, you select a fact. The SQL
Engine can then select any table that contains that fact to use
for the join.
After you select the attribute to which you want to extend the
fact, MicroStrategy Architect returns a list of all facts that are
stored at that attribute level. Using this list of candidate facts,
you can then select the fact for the join. The fact may be
mapped to one table or to multiple tables. If the fact maps to
only one table, the SQL Engine always uses that table for the
join. In such cases, it makes no difference whether you create
the fact extension using the table relation or fact relation
method. However, if the fact maps to multiple tables, the SQL
Engine can select the optimal table to use for a particular
query based on logical size, report level, and so forth. In these
cases, selecting a fact essentially creates a list of tables the
SQL Engine can use for the join. You then allow the SQL
Engine to choose the optimal table for a given query.
For example, when you extend the Freight fact to Item using
a fact relation, MicroStrategy Architect returns the following
list of candidate facts:
List of Candidate Facts
After you select the fact for the join, you then need to select
an attribute or set of attributes on which the SQL Engine
should join. MicroStrategy Architect lists any attributes
whose ID columns are present in tables that contain the
selected fact. As with the table relation method, you can
either manually select the join attributes, or you can allow the
SQL Engine to select the join attributes dynamically on a
query-by-query basis.
8 Click Next.
10 Click Next.
12 Click Next.
14 Click Next.
OR
In the Join attributes list, select the check boxes for the
attributes you want to use in the join.
16 Click Next.
IfAttributes
you chose to select the join attributes, the Join
Direction window opens. Continue to
step 17. If you chose to let the SQL Engine
determine the join attributes, the Allocation
window opens. Continue to step 19.
18 Click Next.
OR
20 Click Next.
The primary steps for this method are selecting the attribute
to which you want to extend the fact and defining the
allocation expression. Both of these steps are the same as for
any other method of creating fact extensions.
8 Click Next.
10 Click Next.
12 Click Next.
OR
14 Click Next.
The image above only displays the first few rows of the
result set for the report.
If you have no need for this cross join and the result set it
produces, you can disallow the Call Center attribute for the
Units Received fact. This fact disallow prevents the SQL
Engine from executing the cross join.
8 Click Next.
10 Click Next.
Exercise: Create a Fact Degradation
Overview
Run the report. Add the Month attribute to the template and
run the report again. After reviewing the error message, save
the report as Degradation Example in the Public
Objects\Reports folder.
Next, you will create degradation for the Forecast Cost fact
to enable you to report on that fact at the Month level. In the
data warehouse, this fact exists only at the Quarter level. You
should use the following allocation expression for the fact
degradation: [Forecast Cost] / 3. After creating the fact
degradation, you should update the project schema.
Run the report. The result set should look like the following:
The image above only displays the first few rows of the
result set for the report.
Detailed Instructions
Create a report
2 Run the report. The result set should look like the
following:
The error message states that the Forecast Cost fact does
not exist at the month level in the data warehouse. If you
want to report on that fact at a level lower than quarter,
you must create a fact degradation.
13 Under What would you like to do?, click Lower the fact
entry level.
14 Click Next.
17 Click Next.
19 Click Next.
21 Click Next.
25 Click Next.
You can now report on the Forecast Cost fact at the month
level. The monthly values are only estimates based on the
allocation expression you provided in the definition of the
fact degradation. Notice that for each month within a
quarter, the forecast cost value is the same.
Lesson Summary
In this lesson, you learned:
Lesson Description
Lesson Objectives
After completing the topics in this lesson, you will be able to:
What Is a Transformation?
Types of Transformations
There are two types of transformations:
Table-Based Transformations
This table also has columns for the parent IDs at all
levels. These columns are not displayed in the image
above.
Expression-Based Transformations
Transformation Components
All transformations have the following components:
Member attributes
Member expressions
Member tables
Mapping type
Member Attributes
Member Expressions
Atable-based
single transformation can use a combination of
and expression-based transformations.
For example, you could create a Last Year
transformation based on the Year, Month, and Day
attributes. Year could use an expression such as
YEAR_ID1.However, Month and Day could map to
columns in a transformation table because their IDs
are not conducive to expression-based transformation.
Member Tables
The member tables store the data for the member attributes.
For expression-based transformations, the member tables
are generally lookup tables that correspond to the attribute
being transformed, such as LU_DAY, LU_QUARTER, and so
forth. For table-based transformations, it is the
transformation table that stores the relationship.
Mapping Type
Creating Transformations
You create expression-based and table-based
transformations using the Transformation Editor.
4 Click Open.
9 Click OK.
Transformation Examples
Transformations are typically used to display time-based
trends.
The MTD Units Sold and YTD Units Sold metrics returns the
number of units sold in the current month and year,
respectively. They use the Month to Date and Year to Date
transformations.
Exercise: Create the Last Years Transformation
Overview
After updating schema, you will then create the Last Years
Forecast Revenue transformation metric.
2011 MicroStrategy, Inc. Exercise: Create the Last Years Transformation 211
5 Transformations MicroStrategy Architect: Advanced Project Design
Detailed Instructions
212 Exercise: Create the Last Years Transformation 2011 MicroStrategy, Inc.
MicroStrategy Architect: Advanced Project Design Transformations 5
6 Click Open.
9 Click OK.
2011 MicroStrategy, Inc. Exercise: Create the Last Years Transformation 213
5 Transformations MicroStrategy Architect: Advanced Project Design
214 Exercise: Create the Last Years Transformation 2011 MicroStrategy, Inc.
MicroStrategy Architect: Advanced Project Design Transformations 5
20 Run the report. The report result set should look like the
following:
Only data for the 2011 and 2012 years is displayed, even
though there is Forecast Revenue data for 2010 in the
data warehouse. Notice that both metrics return different
values for each row, but the Forecast Revenue data for
2011 is identical to the Last Years Forecast Revenue for
2012, as expected.
2011 MicroStrategy, Inc. Exercise: Create the Last Years Transformation 215
5 Transformations MicroStrategy Architect: Advanced Project Design
24 Run the report. The report result set should look like the
following:
29 Click Open.
216 Exercise: Create the Last Years Transformation 2011 MicroStrategy, Inc.
MicroStrategy Architect: Advanced Project Design Transformations 5
32 Click OK.
35 Click Open.
38 Click OK.
41 Click Open.
44 Click OK.
2011 MicroStrategy, Inc. Exercise: Create the Last Years Transformation 217
5 Transformations MicroStrategy Architect: Advanced Project Design
218 Exercise: Create the Last Years Transformation 2011 MicroStrategy, Inc.
MicroStrategy Architect: Advanced Project Design Transformations 5
2011 MicroStrategy, Inc. Exercise: Create the Last Years Transformation 219
5 Transformations MicroStrategy Architect: Advanced Project Design
Lesson Summary
In this lesson, you learned:
Lesson Description
Lesson Objectives
After completing the topics in this lesson, you will be able to:
Server level
Application level
Overview
With warehouse partition mapping, you do not include the
original fact table or the partition base tables in the project.
Rather, you create and maintain a partition mapping table,
which MicroStrategy Architect uses to identify the
partitioned base tables as part of a logical whole. You only
bring the partition mapping table to the project.
You can use any name for the partition mapping table.
7 Click OK.
The Logical View tab shows the attribute by which the base
tables are partitioned. In the image above, the base tables are
partitioned by the Quarter attribute.
Overview
In metadata partition mapping, the application running
against the database still manages the physically partitioned
fact tables, but the execution is different. Metadata partition
mapping does not require a partition mapping table in the
data warehouse. Instead, you define the data contained in
each partition base table in a partition mapping object in
MicroStrategy Architect. This object is stored in the
metadata. You update the partition mapping as new partition
base tables are created.
7 Click OK.
9 Click Define.
Lesson Summary
In this lesson, you learned:
Option 93 cases 91
multisource reports, creating 119
multisource reports, creating objects 115
H
multisource reports, data type compatibil-
hierarchies 22 ity rules 89
multisource reports, processing of
I SQL 120
multisource reports, SQL generation 85
introduction to MultiSource Option 81
O
J
objects, multisource reports 115
joining data from different data
optimal data source, fact tables 87
sources 89
optimal data source, lookup tables 88
overview, creating the project in Mi-
L croStrategy Architect 20
level, fact 145 overview, designing the logical data
Logical Size Editor 44 model 20
Logical Table Editor 42 overview, managing the project
schema 20
logical table size, changing 42
logical table size, role in SQL
generation 41 P
lookup tables, selecting the optimal data partition base tables 224, 227
source 88
partition mapping 23
partition mapping table 225, 227
M partition mapping, metadata 23, 225, 234
managing the project schema, partition mapping, warehouse 23, 225
overview 20 partitioning 223
metadata partition mapping 225, 234 partitioning attributes 227
methods, fact extensions 158 partitioning, application-level 224
multiple data sources, joining data 89 partitioning, database-level 224
multiple data sources, tables 102 partitioning, server-level 224
MultiSource Option, filtering PBTs 227
qualifications 93 PMT 225, 227
MultiSource Option, introduction 81 primary database instances, changing for
MultiSource Option, split fact tables 91 tables 108
MultiSource Option, split lookup primary database instances, table level 81,
tables 92 82
MultiSource Option, supported use primary tables 86
R T
removing a database instance from a table relation method for fact extension,
table 113 steps 159
table relation method, creating a fact
extension 165
S
table-based transformations 195
schema objects 22
table-based transformations, creating 203
schema objects, basic 22
table-level database instances 81, 82
secondary database instances, table
tables 22
level 81, 82
tables, associating to database
secondary tables 86
instances 96
selecting the optimal data source, fact
tables, changing primary database
tables 87
instances 108
selecting the optimal data source, lookup
tables, multiple data sources 102
tables 88
tables, primary 86
server-level partitioning 224
tables, removing database instances 113
single data source, tables 97
tables, secondary 86
split fact tables, MultiSource Option 91
tables, single data source 97
split lookup tables, MultiSource
Option 92 transformation 193
SQL generation, data type compatibility transformation components 198
rules 89 transformation metrics 193, 203
SQL generation, logical table size 41 transformation types 195
SQL generation, multisource reports 85 transformations 23, 193
SQL, multisource reports 120 transformations, creating 200
steps, fact degradation 150 transformations, expression based 195
steps, fact extension using cross product transformations, table based 195
method 176 types of fact level extensions 147
U
use case, filtering qualifications 93
use case, split fact tables 91
use case, split lookup tables 92
use cases, MultiSource Option 91
W
Warehouse Catalog, project-wide
options 36
warehouse partition mapping 225