Advanced Project Design.pdf

download Advanced Project Design.pdf

of 236

Transcript of Advanced Project Design.pdf

  • 7/25/2019 Advanced Project Design.pdf

    1/236

    MICROSTRATEGYARCHITECT: ADVANCEDPROJECTDESIGN

    Course Guide

    Version: ADVPD-941-MAR14-CG

  • 7/25/2019 Advanced Project Design.pdf

    2/236

    20002014 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 thecreation, production, or distribution of the Course or Software, including, but not limited to, the implied warranties ofmerchantability 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 costof all necessary servicing, repair, or correction.

    In no event will MicroStrategy or any other person involved with the creation, production, or distribution of the Courseor Software be liable to you on account of any claim for damage, including any lost profits, lost savings, or otherspecial, incidental, consequential, or exemplary damages, including but not limited to any damages assessed against orpaid by you to any third party, arising from the use, inability to use, quality, or performance of such Course andSoftware, 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 ofcontract warranty, negligence, strict liability for the negligence of indemnity or contribution, the failure of any remedyto achieve its essential purpose, or otherwise.

    The Course and the Software are copyrighted and all rights are reserved by MicroStrategy. MicroStrategy reserves theright to make periodic modifications to the Course or the Software without obligation to notify any person or entity ofsuch revision. Copying, duplicating, selling, or otherwise distributing any part of the Course or Software without priorwritten 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 privateexpense, that no part is public domain, and that the Course and Software are Commercial Computer Software and/orCommercial Computer Software Documentation provided with RESTRICTED RIGHTS under Federal AcquisitionRegulations and agency supplements to them. Use, duplication, or disclosure by the U.S. Government is subject torestrictions 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 Rightsat 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.

    Copyright Information

    All Contents Copyright 2014 MicroStrategy Incorporated. All Rights Reserved.

    Trademark Information

    MicroStrategy, MicroStrategy 6, MicroStrategy 7, MicroStrategy 7i, MicroStrategy 7i Evaluation Edition,

    MicroStrategy 7i Olap Services, MicroStrategy 8, MicroStrategy 9, MicroStrategy Distribution Services, MicroStrategyMultiSource Option, MicroStrategy Command Manager, MicroStrategy Enterprise Manager, MicroStrategy ObjectManager, MicroStrategy Reporting Suite, MicroStrategy Power User, MicroStrategy Analyst, MicroStrategy Consumer,

    MicroStrategy Email Delivery, MicroStrategy BI Author, MicroStrategy BI Modeler, MicroStrategy Evaluation Edition,MicroStrategy Administrator, MicroStrategy Agent, MicroStrategy Architect, MicroStrategy BI Developer Kit,MicroStrategy Broadcast Server, MicroStrategy Broadcaster, MicroStrategy Broadcaster Server, MicroStrategyBusiness Intelligence Platform, MicroStrategy Consulting, MicroStrategy CRM Applications, MicroStrategy Customer

    Analyzer, MicroStrategy Desktop, MicroStrategy Desktop Analyst, MicroStrategy Desktop Designer, MicroStrategyeCRM 7, MicroStrategy Education, MicroStrategy eTrainer, MicroStrategy Executive, MicroStrategy Infocenter,MicroStrategy Intelligence Server, MicroStrategy Intelligence Server Universal Edition, MicroStrategy MDX Adapter,MicroStrategy Narrowcast Server, MicroStrategy Objects, MicroStrategy OLAP Provider, MicroStrategy SDK,

  • 7/25/2019 Advanced Project Design.pdf

    3/236

    MicroStrategy Support, MicroStrategy Telecaster, MicroStrategy Transactor, MicroStrategy Web, MicroStrategy WebBusiness Analyzer, MicroStrategy World, Application Development and Sophisticated Analysis, Best In BusinessIntelligence, Centralized Application Management, Information Like Water, Intelligence Through Every Phone,

    Intelligence To Every Decision Maker, Intelligent E-Business, Personalized Intelligence Portal, Query Tone, RapidApplication Development, MicroStrategy Intelligent Cubes, The Foundation For Intelligent E-Business, The IntegratedBusiness Intelligence Platform Built For The Enterprise, The Platform For Intelligent E-Business, The Scalable

    Business Intelligence Platform Built For The Internet, Office Intelligence, MicroStrategy Office, MicroStrategy Report

    Services, MicroStrategy Web MMT, MicroStrategy Web Services, Pixel Perfect, Pixel-Perfect, MicroStrategy Mobile,MicroStrategy Integrity Manager and MicroStrategy Data Mining Services are all registered trademarks or trademarksof MicroStrategy Incorporated.

    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 thatmay 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,127,403, 7,174,349, 7,181,417, 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,7,861,253, 7,881,443, 7,925,616, 7,945,584, 7,970,782, 8,005,870, 8,051,168, 8,051,369, 8,094,788, 8,130,918,8,296,287, 8,321,411 and 8,452,755. Other patent applications are pending.

    How to Contact Us

    MicroStrategy University

    1850 Towers Crescent PlazaTysons Corner, VA 22182

    Phone: 877.232.7168Fax: 703.848.8602

    E-mail: [email protected]://www.microstrategy.com/training-events

    MicroStrategy Incorporated

    1850 Towers Crescent PlazaTysons Corner, VA 22182

    Phone: 703.848.8600Fax: 703.848.8610

    E-mail: [email protected]://www.microstrategy.com

  • 7/25/2019 Advanced Project Design.pdf

    4/236

  • 7/25/2019 Advanced Project Design.pdf

    5/236

    MicroStrategy Architect: Advanced Project Design Table of Contents

    2014 MicroStrategy Inc. 5

    TABLEOFCONTENTS

    Preface Course Description...................................................................... 9

    Who Should Take this Course............................................... 10

    Course Prerequisites ............................................................. 10

    Follow-up Courses................................................................. 10

    Related Certifications............................................................. 10

    Course Objectives ................................................................. 11

    About the Course Materials ......................................................... 12

    Content Descriptions ............................................................. 12

    Learning Objectives............................................................... 12

    Lessons ................................................................................. 12Opportunities for Practice ...................................................... 13

    Typographical Standards....................................................... 13

    MicroStrategy Courses .......................................................... 15

    Core Courses......................................................................... 15

    Advanced Courses ................................................................ 16

    1. Introduction to

    Advanced Project

    Design

    Lesson Description ................................................................... 17

    Lesson Objectives ................................................................. 18

    Review of the Project Design Process......................................... 19

    Review of Schema Objects.......................................................... 22

    Using the Fact Editor ............................................................. 24

    Lesson Summary......................................................................... 26

  • 7/25/2019 Advanced Project Design.pdf

    6/236

    Table of Contents MicroStrategy Architect: Advanced Project Design

    6 2014 MicroStrategy Inc.

    2. Managing Project

    Schema

    Lesson Description ................................................................... 27

    Lesson Objectives ................................................................. 28

    Review of Database Instances .................................................... 29

    Primary/Secondary Database Instances at the Project Level 30

    Maintaining Warehouse ............................................................... 32

    Maintaining Tables................................................................. 32

    Aggregation Awareness............................................................... 35

    Review of Base and Aggregate Fact Tables.......................... 35

    How Is MicroStrategy Aggregate-Aware?.............................. 36

    Data Marts ................................................................................... 40

    What Is a Data Mart? ............................................................. 40

    Creating Data Marts............................................................... 46

    Using Data Marts in a Project ................................................ 54

    Lesson Summary......................................................................... 58

    Exercises: Managing Project Schema......................................... 61Forecasting Project Information............................................. 61

    3. Using MicroStrategy

    MultiSource Option

    Lesson Description ................................................................... 73

    Lesson Objectives ................................................................. 74

    Introduction to MicroStrategy MultiSource Option ....................... 75

    Primary/Secondary Database Instances at the Table Level .. 76

    Support for Duplicate Tables ................................................. 77

    SQL Generation for Multisource Reports............................... 78

    Supported Use Cases............................................................ 83Associating Tables to Database Instances.................................. 88

    Adding Tables with a Single Data Source.............................. 89

    Adding Tables with Multiple Data Sources ............................ 92

    Changing the Primary Database Instance for a Table ........... 95

    Removing a Database Instance from a Table........................ 98

    Creating Objects for Multisource Reports.................................. 100

    Creating the Forecast Revenue Fact ................................... 102

    Creating the Forecast Revenue Metric ................................ 103

    Creating a Multisource Report ................................................... 104

    Processing of SQL for Sample Report................................. 105

    Lesson Summary....................................................................... 114

    Exercises: Using MicroStrategy MultiSource Option ................. 117

    (Provisional) Demonstration Exercises................................ 117

    Add Tables from a Secondary Database Instance and Create anAttribute and Metric for a Multisource Report ...................... 121

    Create a Multisource Report ................................................ 126

  • 7/25/2019 Advanced Project Design.pdf

    7/236

    MicroStrategy Architect: Advanced Project Design Table of Contents

    2014 MicroStrategy Inc. 7

    4. Fact Level Extensions Lesson Description ................................................................. 129

    Lesson Objectives ............................................................... 130

    Overview of Fact Level Extensions............................................ 131

    Creating Fact level Extensions in Fact Editor ...................... 133

    Degrading Fact Levels............................................................... 135

    Steps for Fact Degradation.................................................. 137

    Creating a Fact Degradation................................................ 139

    Extending Fact Levels ............................................................... 143

    Steps for Fact Extension Using the Table Relation Method 146

    Creating Fact Extensions Using the Table Relation Method 151

    Disallowing Fact Levels ............................................................. 156

    Lesson Summary....................................................................... 161

    Exercise: Fact Level Extensions................................................ 163

    Create a Fact Degradation .................................................. 163

    5. Transformations Lesson Description ................................................................. 169

    Lesson Objectives ............................................................... 170

    What Is a Transformation? ........................................................ 171

    Types of Transformations .................................................... 173

    Transformation Components ............................................... 176

    Creating and Using Transformations......................................... 178

    Creating Transformations .................................................... 178

    Using Transformations in Metrics ........................................ 181

    Transformation Examples.................................................... 185Lesson Summary....................................................................... 190

    Exercise: Transformation........................................................... 191

    Create the Last Years Transformation................................ 191

    6. Partitioning Lesson Description ................................................................. 199

    Lesson Objectives ............................................................... 200

    Introduction to Partitioning Concepts......................................... 201

    Warehouse Partition Mapping ................................................... 204

    Overview.............................................................................. 204

    Implementing Warehouse Partition Mapping....................... 205

    Metadata Partition Mapping....................................................... 212

    Overview.............................................................................. 212

    Implementing Metadata Partition Mapping .......................... 212

    Lesson Summary....................................................................... 216

  • 7/25/2019 Advanced Project Design.pdf

    8/236

    Table of Contents MicroStrategy Architect: Advanced Project Design

    8 2014 MicroStrategy Inc.

    A. Warehouse Catalog Maintaining Individual Tables............................................... 220

    Project-Wide Warehouse Catalog Options .......................... 222

    Adding tables with Multisource Option....................................... 225

    Index ......................................................................................... 233

  • 7/25/2019 Advanced Project Design.pdf

    9/236

    2014 MicroStrategy Inc. 9

    PREFACE

    Course Description

    This one day course covers advanced features involved in thecreation and maintenance of a MicroStrategy project. Thecourse assumes an understanding of basic reportdevelopment concepts from the two day MicroStrategyDeveloper: Reporting Essentials course and the two dayMicroStrategy Architect: Project Design Essentials course.

    First, students will learn how to manage project data sourcesusing primary and secondary database instances and how tomaintain a project schema with the Architect graphicalinterface. Next, students will learn how the MicroStrategyEngine is aggregate-aware and how to create aggregate tablesusing data marts. Next, students will learn how to useMicroStrategy MultiSource Option to configure projects toaccess heterogeneous data sources. Finally, students willlearn about fact level extensions, transformations, andpartition mappings.

    After taking this course, students will understand how tomaintain MicroStrategy projects and how to build advancedschema objects.

  • 7/25/2019 Advanced Project Design.pdf

    10/236

    Preface MicroStrategy Architect: Advanced Project Design

    10 Who Should Take this Course 2014 MicroStrategy Inc.

    Who Should Take this Course

    This course is designed for:

    Project architects

    Course Prerequisites

    Before starting this course, you should know all topics covered in the followingcourses:

    MicroStrategy Developer: Reporting Essentials

    MicroStrategy Architect: Project Design Essentials

    You should also have a basic knowledge of SQL.

    Follow-up Courses

    After taking this course, you might consider taking the following courses:

    MicroStrategy Advanced Data Warehousing

    Related Certifications

    This course does not have any recommended follow-up certifications.

  • 7/25/2019 Advanced Project Design.pdf

    11/236

    MicroStrategy Architect: Advanced Project Design Preface

    2014 MicroStrategy Inc. Course Objectives 11

    Course Objectives

    After completing this course, you will be able to:

    Describe the project design process, and describe the basic and advancedschema objects you can create with MicroStrategy Architect. (Page 18)

    Define the primary and secondary database instance, use the Architectgraphical interface to maintain project tables, describe how theMicroStrategy SQL Engine is aggregate aware, and create aggregate facttables using data marts. (Page 28)

    Describe how you can use MultiSource Option to access heterogeneous datasources, associate tables in a project to multiple database instances, createobjects for multisource reports, and create multisource reports. (Page 74)

    Describe the three types of fact level extensions available in MicroStrategyArchitect, create fact degradationsto lower the levels of facts, create factextensions to extend the levels of facts to other hierarchies, and disallow factlevels to prevent unnecessary cross joins. (Page 130)

    Create different types of transformations, use transformations intransformation metrics, and describe common uses for transformations inreporting. (Page 170)

    Describe the purpose of partitioning, explain the differencebetween the

    server-level and the application-level partitioning, and use warehouse andmetadata partition mapping to support partitioned fact tables in aMicroStrategy project. (Page 200)

  • 7/25/2019 Advanced Project Design.pdf

    12/236

    Preface MicroStrategy Architect: Advanced Project Design

    12 About the Course Materials 2014 MicroStrategy Inc.

    About the Course Materials

    This course is organized into lessons and reference appendices. Each lessonfocuses on major concepts and skills that help you to better understand

    MicroStrategy products and use them to implement MicroStrategy projects.The appendices provide you with supplemental information to enhance yourknowledge of MicroStrategy products.

    Content Descriptions

    Each major section of this course begins with a Description heading. TheDescription introduces you to the content contained in that section.

    Learning Objectives

    Learning objectives enable you to focus on the key knowledge and skills youshould obtain by successfully completing this course. Objectives are providedfor you at the following three levels:

    CourseYou will achieve these overall objectives by successfullycompleting all the lessons in this course. The Course Objectives heading inthis Preface contains the list of course objectives.

    LessonYou will achieve these main objectives by successfully completingall the topics in the lesson. You can find the primary lesson objectivesdirectly under the Lesson Objectives heading at the beginning of eachlesson.

    Main TopicYou will achieve this secondary objective by successfullycompleting the main topic. The topic objective is stated at the beginning ofthe topic text. You can find a list of all the topic objectives in each lessonunder the Lesson Objectives heading at the beginning of each lesson.

    Lessons

    Each lesson sequentially presents concepts and guides you with step-by-stepprocedures. Illustrations, screen examples, bulleted text, notes, and definitiontables help you to achieve the learning objectives.

  • 7/25/2019 Advanced Project Design.pdf

    13/236

  • 7/25/2019 Advanced Project Design.pdf

    14/236

    Preface MicroStrategy Architect: Advanced Project Design

    14 About the Course Materials 2014 MicroStrategy Inc.

    Data Entry

    References to literal data you must type in an exercise or procedure are in boldArial font style. References to data you type that could vary from user to user orsystem to system are in bold italic Arial font style. The following example

    shows this style:

    Type copy c:\filenamed:\foldername\filename.

    Keyboard Keys

    References to a keyboard key or shortcut keys are in uppercase letters in boldArial font style. The following example shows this style:

    Press CTRL+B.

    New Terms

    New terms to note are in regular italic font style. These terms are defined whenthey are first encountered in the course. The following example shows thisstyle:

    The aggregation levelis the level of calculation for the metric.

    Notes and Warnings

    A note icon indicates helpful information.

    A warning icon calls your attention to very important information thatyou should read before continuing the course.

  • 7/25/2019 Advanced Project Design.pdf

    15/236

    MicroStrategy Architect: Advanced Project Design Preface

    2014 MicroStrategy Inc. About the Course Materials 15

    MicroStrategy Courses

    Core Courses Implementing MicroStrategy: Development and Deployment

    MicroStrategy Web Essentials

    MicroStrategy Web for Reporters and Analysts

    MicroStrategy Web for Professionals

    MicroStrategy Visual Insight Essentials

    MicroStrategy Report Services: Documents and Dashboards

    MicroStrategy Mobile for App Developers

    MicroStrategy Architect: Project Design Essentials

    MicroStrategy Developer: Reporting Essentials

    MicroStrategy Developer: Advanced Reporting

    MicroStrategy Office Essentials

  • 7/25/2019 Advanced Project Design.pdf

    16/236

    Preface MicroStrategy Architect: Advanced Project Design

    16 About the Course Materials 2014 MicroStrategy Inc.

    Advanced Courses

    MicroStrategy Administration: Configuration and Security

    MicroStrategy Administration: Application Management

    MicroStrategy Engine Essentials

    MicroStrategy Architect: Advanced Project Design

    MicroStrategy Advanced Data Warehousing

    MicroStrategy Data Mining and Advanced Analytics

    MicroStrategy Developer: Advanced Reporting Case Studies

    MicroStrategy Freeform SQL Essentials

    MicroStrategy Transaction Services for Mobile App and DashboardDevelopers

    MicroStrategy Web SDK: Customization Essentials

    MicroStrategy Web SDK: Customizing Security

    MicroStrategy Web SDK: Portal IntegrationAll courses are subject to change. Please visit the MicroStrategy Web site for the latest education offerings.

  • 7/25/2019 Advanced Project Design.pdf

    17/236

    2014 MicroStrategy Inc. 17

    1

    INTRODUCTIONTOADVANCED

    PROJECTDESIGN

    Lesson Description

    This lesson introduces you to the MicroStrategy Architect: Advanced ProjectDesign course.

    In this lesson, you will first review the project design process and learn aboutthe tools and components that enable you to manage the project schema. Next,you will review the basic schema objects that you can create in MicroStrategyArchitect. Finally, you will learn about additional schema objects that enableyou to perform advanced functions.

  • 7/25/2019 Advanced Project Design.pdf

    18/236

    Introduction to Advanced Project Design MicroStrategy Architect: Advanced Project Design1

    18 Lesson Objectives 2014 MicroStrategy Inc.

    Lesson Objectives

    After completing this lesson, you will be able to:

    Describe the project design process, and describe the basic and advancedschema objects you can create with MicroStrategy Architect.

    After completing the topics in this lesson, you will be able to:

    Describe the project design process and learn about the tools andcomponents that enable you to manage the project schema. (Page 19)

    Describe the basic schema objects that you can create in MicroStrategyArchitect and learn about additional schema objects that enable you toperform advanced functions. (Page 22)

  • 7/25/2019 Advanced Project Design.pdf

    19/236

    MicroStrategy Architect: Advanced Project Design Introduction to Advanced Project Design 1

    2014 MicroStrategy Inc. Review of the Project Design Process 19

    Review of the Project Design Process

    After completing this topic, you will be able to:

    Describe the project design process and learn about the tools and componentsthat enable you to manage the project schema.

    In the MicroStrategy Architect: Project Design Essentials course, you learnedabout the primary steps involved in the project design process:

    Project Design Process

    Recall that project design involves more than just creating a project inMicroStrategy Architect. Understanding how users want to report oninformation in the data warehouse, how data in the warehouse is related, andhow that data is stored are all fundamental parts of the project design process.

    Designing the Logical Data Model

    When you design the logical data model, you need to determine theinformation that users want to see in reports and determine what informationis actually available in the source systems. Finally, you design the model thatincorporates both.

    Designing the Data Warehouse Schema

    When you design the data warehouse schema, you need to first consider theadvantages and disadvantages of various structures for storing data in the datawarehouse. You then determine the optimal schema design that balances thereporting requirements, performance requirements, and maintenanceoverhead. Finally, you create the data warehouse using this schema design ormodify the existing data warehouse to use this schema design.

  • 7/25/2019 Advanced Project Design.pdf

    20/236

    Introduction to Advanced Project Design MicroStrategy Architect: Advanced Project Design1

    20 Review of the Project Design Process 2014 MicroStrategy Inc.

    Creating the Project in MicroStrategy Architect

    You need to have a solid design for the logical data model and data warehouseschema before you move on to creating the actual project. Both of thesecomponents can directly affect how you query data in a project, what data you

    can query, how fast queries run, and so forth.

    Managing the Project Schema

    Managing the project schema is the final and ongoing step in the project designprocess. Over the life of the project, your logical data model or data warehousemay change, or your reporting needs may change, which can necessitatechanges to schema objects.

  • 7/25/2019 Advanced Project Design.pdf

    21/236

    MicroStrategy Architect: Advanced Project Design Introduction to Advanced Project Design 1

    2014 MicroStrategy Inc. Review of the Project Design Process 21

    In the MicroStrategy Architect: Advanced Project Design course, you will learnabout different strategies and tools that help you manage your projectsschema. In particular, you will learn about the following:

    Primary and secondary database instancesA database instance is a logicalobject in the MicroStrategy metadata that typically represents a connection

    to a data warehouse. Each project must have a primary database instance.You can associate any number of secondary database instancesdatasourcesto a project.

    Aggregation awarenessMicroStrategy Architect assigns each table alogical table size and uses it to query the aggregate table rather than thebase fact table in cases where either table could provide the answer.

    Data martsA data mart is a relational table containing results of a report.Among other applications, you can use data marts to create aggregate facttables.

    Multisource report executionBy default, the objects in a standard reporthave to come from a single data source. However, you can use theMultiSource Optionan add-on component to Intelligence Servertoovercome this limitation. MultiSource Option enables you to define a singleproject schema that uses multiple data sources. As a result, you can create astandard report that executes SQL against multiple data sources.

  • 7/25/2019 Advanced Project Design.pdf

    22/236

    Introduction to Advanced Project Design MicroStrategy Architect: Advanced Project Design1

    22 Review of Schema Objects 2014 MicroStrategy Inc.

    Review of Schema Objects

    After completing this topic, you will be able to:

    Describe the basic schema objects that you can create in MicroStrategyArchitect and learn about additional schema objects that enable you to performadvanced functions.

    Recall that schema objectsare logical objects that relate application objects todata warehouse content. They are the bridge between your reportingenvironment and your data warehouse. As such, you have to create the basicschema objects a project requires before you can complete any other tasks,such as creating templates, filters, reports, or documents.

    In the MicroStrategy Architect: Project Design Essentials course you learnedhow to create the following basic schema objects that form the foundation of aMicroStrategy project:

    TablesLogical objects that correspond to physical tables stored in the datawarehouse that you want to use in a MicroStrategy project

    FactsLogical objects that relate aggregatable data stored in the datawarehouse to the MicroStrategy reporting environment. They are usuallynumeric, and you can aggregate them to different levels, depending on yourreporting needs.

    AttributesLogical objects that relate descriptive (non-fact) data stored inthe data warehouse to the MicroStrategy reporting environment. Theyprovide context for reporting on facts and define the level of detail at whichyou want to analyze facts.

    HierarchiesLogical objects that enable you to group attributes to reflecttheir relationships or provide convenient browsing and drilling paths in theMicroStrategy reporting environment.

  • 7/25/2019 Advanced Project Design.pdf

    23/236

    MicroStrategy Architect: Advanced Project Design Introduction to Advanced Project Design 1

    2014 MicroStrategy Inc. Review of Schema Objects 23

    The following illustration shows an example of each of these types of schemaobjects:

    Basic Schema Objects

    In the MicroStrategy Architect: Advanced Project Design course, you will learnabout additional properties of facts. You will learn how to create different typesof fact extensions that will enable you to report on facts at additional levels,beyond how they are stored in the data warehouse.

    You can also create other types of schema objects in MicroStrategy that you usefor more advanced functions:

    TransformationsLogical objects most often used to compare values atdifferent timesfor example, this year versus last year and today versusmonth to date. Transformations are useful for discovering and analyzingtime-based trends in your data.

    Partition mappingsPartitioning is the division of a larger table intosmaller tables in the data warehouse. You can bring partitioned tables intoa MicroStrategy project through warehouse partition mapping or metadatapartition mapping.

  • 7/25/2019 Advanced Project Design.pdf

    24/236

    Introduction to Advanced Project Design MicroStrategy Architect: Advanced Project Design1

    24 Review of Schema Objects 2014 MicroStrategy Inc.

    The following illustration shows an example of each of these types of schemaobjects. You will learn about these objects later in the course:

    Additional Schema Objects

    Using the Fact Editor

    You created basic facts in the Architect graphical interface. However, if youwant to create individual facts, modify existing facts, or add complexity to factsyou initially created in Architect, you use the Fact Editor. The Fact Editor isone of the schema object editors available in Developer. It enables you to createor modify any type of fact or fact expression and configure a variety offact-related settings.

    To access the Fact Editor:

    1 Open the desired project.

    2 Do one of the following:

    If you are creating a new fact, on the File menu, point to Newand selectFact.

    OR

    If you are modifying an existing fact, in the Schema Objects folder, selectthe Factsfolder.

    In the Facts folder, double-click the fact you want to modify.

  • 7/25/2019 Advanced Project Design.pdf

    25/236

    MicroStrategy Architect: Advanced Project Design Introduction to Advanced Project Design 1

    2014 MicroStrategy Inc. Review of Schema Objects 25

    The following image shows the Fact Editor:

    Fact Editor

    The Fact Editor has the following tabs:

    DefinitionThis tab enables you to create, modify, and delete factexpressions.

    Column AliasThis tab enables you to modify the column alias for a fact.

    ExtensionsThis tab enables you to create, modify, and delete levelextensions for a fact.

    All facts have a definition and column alias, but level extensions for facts areoptional. You already know about the first two tabs from the Project DesignEssentials course. You will learn more about extensions later in this course.

  • 7/25/2019 Advanced Project Design.pdf

    26/236

    Introduction to Advanced Project Design MicroStrategy Architect: Advanced Project Design1

    26 Lesson Summary 2014 MicroStrategy Inc.

    Lesson Summary

    In this lesson, you learned:

    The project design process involves the following steps: designing thelogical data model, designing the data warehouse schema, creating theproject in MicroStrategy Architect, and managing the project schema.

    As part of managing the project schema, you will learn how to defineprimary and secondary database instances, understandaggregation-awareness, create data marts, enable multisource reportexecution, and use fact editors.

    The following basic schema objects form the foundation of a MicroStrategyproject: tables, facts, attributes, and hierarchies.

    You can also create other types of schema objects in MicroStrategy suchas transformations and partition mappingsthat you use for moreadvanced functions.

    The Fact Editor is one of the schema object editors available in Developer.It enables you to create or modify any type of fact or fact expression andconfigure a variety of fact-related settings.

  • 7/25/2019 Advanced Project Design.pdf

    27/236

    2014 MicroStrategy Inc. 27

    2

    MANAGINGPROJECTSCHEMA

    Lesson Description

    This lesson covers a variety of advanced topics that enable you to maintain aMicroStrategy project as it changes over time and help you optimize

    performance within your project.

    In this lesson, you will review the concept of primary and secondary databaseinstances. You will then learn about options that enable you to maintainproject tables. You will also learn how the MicroStrategy SQL Engine isaggregate aware. Finally, you will learn how to create aggregate fact tablesusing data marts. You will learn what a data mart is, how to create data martreports and data mart tables, and how to incorporate data mart tables into aproject.

  • 7/25/2019 Advanced Project Design.pdf

    28/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    28 Lesson Objectives 2014 MicroStrategy Inc.

    Lesson Objectives

    After completing this lesson, you will be able to:

    Define the primary and secondary database instance, use the Architectgraphical interface to maintain project tables, describe how the MicroStrategySQL Engine is aggregate aware, and create aggregate fact tables using datamarts.

    After completing the topics in this lesson, you will be able to:

    Describe the primary and secondary database instances and their use inMicroStrategy project. (Page 29)

    Describe how the Warehouse Tables pane options in the Architect graphicalinterface can help you maintain a project over time. (Page 32)

    Describe how MicroStrategy Architect calculates logical table size, and howthe SQL Engine uses logical table size to select the optimal table for aquery. (Page 35)

    Define a data mart, and list and define data mart objects; create a data marttable by creating and executing a data mart report; list and define data martcolumn creation options, and use a data mart table in a project. (Page 40)

  • 7/25/2019 Advanced Project Design.pdf

    29/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Review of Database Instances 29

    Review of Database Instances

    After completing this topic, you will be able to:

    Describe the primary and secondary database instances and their use inMicroStrategy project.

    A database instanceis the logical object in the MicroStrategy metadata thattypically represents a connection to a data warehouse. Whenever you run areport, you connect to the data warehouse using the DSN, login, and passwordstored as part of the database instance definition.

    You learned how to create a database instance in the MicroStrategyArchitect: Project Design Essentials course.

    If you are using security features such as warehouse authentication orconnection mapping, different users may access the same datawarehouse using different DSNs or logins. However, even in these cases,the project database instance is still associated with a default DSN andlogin.

    Although a project uses a single primary database instance to access the datawarehouse, you can create any number of secondary database instances thatpoint to a variety of data sources. You can then use these database instances forother tasks such as creating data marts and Freeform SQL or Query Builder

    reports.

    To create and configure database instances, you must have theappropriate administrative privileges.

    For more information about Freeform SQL reports, refer to theMicroStrategy Freeform SQL Essentials course.

    You also create and configure a database instance to connect to an MDXdata source. For more information on MDX reports, refer to theMDXCube Reporting Guide product manual.

  • 7/25/2019 Advanced Project Design.pdf

    30/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    30 Review of Database Instances 2014 MicroStrategy Inc.

    Primary/Secondary Database Instances at the Project Level

    By default, the database instance you select during the project creation processbecomes the projectsprimary database instance. All standard reports in aproject execute against the data source defined in the primary database

    instance by default.

    Each MicroStrategy project must have a primary database instance. However,you can associate any number of secondary database instanceswith a singleproject.

    If you want to use a secondary database instance in a project to create datamarts, Freeform SQL, Query Builder, or MDX reports, you must first explicitlyassociate it with the project. When you create a non-standard report, it thenexecutes SQL against the database instance to which it points.

    You can also associate a secondary database instance with a projectautomatically, by adding a table from the secondary database instanceto a project using MultiSource Option. MultiSource Option is onlyavailable with three tier projects. You will learn about MultiSourceOption later in this course.

    To associate a secondary database instance with a project:

    1 In Developer, log in to the project source that contains your project.

    2 Using the Database Instances manager, create the database instance thatpoints to the secondary data source.

    To learn how to create database instances, refer to the MicroStrategyArchitect: Project Design Essentials or MicroStrategyAdministration: Configuration and Security courses.

    3 Right-click the project name and select Project Configuration.

    4 In the Project Configuration Editor, in the Categories list, expand theDatabase instancescategory.

    5 In the Available Data Mart, Query Builder, Freeform and non-primarywarehouse database instances list, select the database instance that youwant to associate to the project.

    You can also create new database instance by clicking New.

  • 7/25/2019 Advanced Project Design.pdf

    31/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Review of Database Instances 31

    6 In the message window, click No.

    This window asks you if you want to configure the data martoptimization for the database instance. You do not have to configuredata mart optimization if you do not plan to use that databaseinstance to create data marts. For information on database

    optimization, see Data Mart Optimization starting on page 44.

    7 Click OKto close Project Configuration Editor.

    The following image shows the Project Configuration Editor with a singleprimary database instance and multiple secondary database instancesassociated with the MicroStrategy Tutorial project:

    Primary and Secondary Database Instances

    Whether you create a standard or a non-standard report, it always executesSQL against a single data source (database instance). If you want to combinedata from multiple data sources, you can then create a Report Servicesdocument and include standard and non-standard reports that connect todifferent data sources as its datasets. However, you cannot access two distinctdata sources within a single standard or non-standard report unless you useMultiSource Option, which is covered later in this lesson.

  • 7/25/2019 Advanced Project Design.pdf

    32/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    32 Maintaining Warehouse 2014 MicroStrategy Inc.

    Maintaining Warehouse

    After completing this topic, you will be able to:

    Describe how the Warehouse Tables pane options in the Architect graphicalinterface can help you maintain a project over time.

    In the MicroStrategy Architect: Project Design Essentials course, you learnedhow to create a MicroStrategy project. However, a project grows and changesover time as the volume of data or number of users increase, new requirementsarise, or existing requirements change. You need to be able to adequatelymaintain a project throughout all stages of its life cycle. MicroStrategyArchitect provides the functionality to assist you with project maintenance.

    MicroStrategy also has a variety of administration functionalitiesdesigned to help you with project maintenance. For more information,see the MicroStrategy Administration: Application Management course.

    You already learned how to use the Warehouse Tables pane in Architectgraphical interface to select the data warehouse tables you want to use in aMicroStrategy project. Now, you will learn about other options available thatenable you to maintain a project.

    Maintaining Tables

    After you add warehouse tables to a project and create schema and applicationobjects, you may find that the warehouse schema changes over time. Thedatabase administrator may alter the structure of a table, for example, byadding additional columns. Some table sizes may grow over time, while othersremain the same, making them better candidates for aggregate queries. Sometables may become obsolete and may be removed from the warehouse.

  • 7/25/2019 Advanced Project Design.pdf

    33/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Maintaining Warehouse 33

    The Warehouse Tables pane in Architect graphical interface enables you tomaintain the integrity of the logical tables with the data warehouse structure. Itprovides a variety of options that apply to the project tables on an individualbasis. You access these options in the Warehouse Tables pane by right-clickingany table you have added to a project. The following image displays these tableoptions:

    Table Options

    The Warehouse Tables pane provides the following options for individualtables:

    Update StructureIf the table structure has changed since you added thetable to the project, you can click Update Structureto force MicroStrategyArchitect to recognize the changes.

    Show Sample DataThis option enables you to view the first 100 rows ofdata in a table.

    Select Database InstanceThis option enables you to add additionaldatabase instances associated with the project.

  • 7/25/2019 Advanced Project Design.pdf

    34/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    34 Maintaining Warehouse 2014 MicroStrategy Inc.

    You can view a tables structure before you add it to the project. To showthe columns in a table, click expand.

  • 7/25/2019 Advanced Project Design.pdf

    35/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Aggregation Awareness 35

    Aggregation Awareness

    After completing this topic, you will be able to:

    Describe how MicroStrategy Architect calculates logical table size, and how theSQL Engine uses logical table size to select the optimal table for a query.

    Review of Base and Aggregate Fact Tables

    In the MicroStrategy Architect: Project Design Essentials course, you learnedthat there are two types of fact tables that you typically have in a data

    warehouse.Base fact tablesare tables that store a fact or set of facts at thelowest possible level of detail.Aggregate fact tablesare tables that store a factor set of facts at a higher, or summarized, level of detail.

    For example, consider the following two fact tables:

    Base and Aggregate Fact Tables

    The FACT_SALES table stores dollar and unit sales data at the lowest possiblelevel of detailby item, employee, and date. Therefore, it is the base fact tablefor these two facts. The FACT_SALES_AGG table stores dollar and unit sales

    data at a higher level of detailby category, region, and month. Therefore, it isan aggregate fact table for these two facts.

    Because they store data at a higher level, aggregate fact tables reduce querytime. For example, if you want to view a report that shows unit sales by region,you can obtain the result set more quickly using the FACT_SALES_AGG tablethan the FACT_SALES table.

  • 7/25/2019 Advanced Project Design.pdf

    36/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    36 Aggregation Awareness 2014 MicroStrategy Inc.

    In a data warehouse, you often have multiple aggregate fact tables for the samefact or set of facts to enable you to more quickly analyze fact data at variouslevels of detail.

    For guidelines on building aggregate fact tables, refer to theMicroStrategy Advanced Data Warehousing course.

    Using Aggregate Tables in a Project

    There are two actions that you need to perform to integrate an aggregate facttable into an existing project:

    1 Add the table to the project using the Warehouse Tables pane in Architectgraphical interface.

    2 If necessary, map the existing attributes and facts to the aggregate table.

    If your aggregate fact table structure is consistent with your base fact tablestructure, MicroStrategy Architect will automatically add the table to thedefinitions of your existing attributes and facts. However, if your aggregate facttable structure contains new columns that have not been mapped to existingattribute form expressions and fact expressions, you must manually map thenew table to the desired attributes and facts.

    If the aggregate fact table structure matches the base fact table,MicroStrategy Architect can automatically map the new table to existingattributes and facts as long as automatic mapping is used for thecorresponding attribute form expressions and fact expressions.

    How Is MicroStrategy Aggregate-Aware?

    At this point, you should understand how MicroStrategy Architect becomesaware of aggregate fact tables. However, the question remains as to howMicroStrategy Architect knows to use the aggregate table rather than the basefact table in cases where either table can provide the answer.

  • 7/25/2019 Advanced Project Design.pdf

    37/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Aggregation Awareness 37

    MicroStrategy Architect assigns a size to every table when you initially addthem to a project. These size assignments are stored in the metadata.MicroStrategy Architect assigns sizes based on the columns in the tables andthe attributes to which those columns correspond. Because MicroStrategyArchitect uses the logical attribute definitions to assign a size to each table inthe project, this measurement is referred to as logical table size.

    The following illustration is a visual representation of the algorithm used byMicroStrategy Architect in assigning logical table sizes:

    Calculating the Logical Table Size

    Logical table size is the sum of the weight for each attribute contained in thetable. Attribute weight is defined as the position of an attribute in its hierarchydivided by the number of attributes in the hierarchy, multiplied by a factor of10. Using this formula, MicroStrategy Architect calculates the respectiveweight of each attribute as shown in the illustration above. The logical tablesize of each fact table is simply the sum of its 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 thewarehouse, it looks at the logical table size and generates SQL against the tablewith the smallest logical table size. This process helps the SQL Engine select

    the optimal table for a query.

  • 7/25/2019 Advanced Project Design.pdf

    38/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    38 Aggregation Awareness 2014 MicroStrategy Inc.

    Changing the Logical Table Size

    At times, you may need to reassign the logical table size for a table. Forexample, in the previous illustration for logical table sizes, there are twoaggregate 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 hasclass and store information. Clearly, based on the attributes they contain, thetable with item and region information is larger. There are many more itemsthan classes to which items belong. In this example, where the logical table sizeis the same but the physical size is actually very different, you can change thelogical table size automatically assigned by MicroStrategy Architect.

    Generally, smaller logical size does equate to smaller physical size. Tables withhigher-level attributes usually have a smaller logical table size than tables withlower-level attributes. However, there are times when this is not the case due tothe particular combination of attributes in a table. In such cases, you have to

    change the logical table size to force the SQL Engine to use the table that youknow has a smaller physical size.

    To change the logical table size for a table:

    1 In Architect graphical interface, on the Project Tables view tab, select atable.

    2 In the Properties pane, in the Definition section, click the Logical Sizebox,

    type the new logical table size value.

    To lock the logical size of the table you need to access Logical SizeEditor. You cannot lock the size of the table from the Properties pane.

    To change logical table sizes and lock the table sizes using the Logical Size

    Editor:

    1 On the Design tab, in the Editors section, click Edit logical size of tablesbutton.

  • 7/25/2019 Advanced Project Design.pdf

    39/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Aggregation Awareness 39

    2 In the Logical Size Editor, for the table you want to modify, in the Size valuebox, type a new logical table size value.

    3 If you want to preserve the logical table size of a table, select its Size lockedcheck box.

    4 Click OKto close the Logical Size Editor.

    The following image shows the Logical Size Editor:

    Changing Logical Size in the Logical Size Editor

    You should select Size Locked option if you want to ensure that thelogical size you have selected is not overwritten by MicroStrategyArchitect during updates of the project schema. When you updatethe project schema, you can choose to update logical table sizes. Youmay need to perform this action for other tables. Selecting thisoption allows you to update the logical sizes of other tables whilepreserving the sizes of tables that you have manually assigned.

    5 Click Save and Close.

    6 Update the project schema.

  • 7/25/2019 Advanced Project Design.pdf

    40/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    40 Data Marts 2014 MicroStrategy Inc.

    Data Marts

    After completing this topic, you will be able to:

    Define a data mart, and list and define data mart objects; create a data marttable by creating and executing a data mart report; list and define data martcolumn creation options, and use a data mart table in a project.

    What Is a Data Mart?

    A data martis a relational table containing results of a report. You create the

    data mart report in Developer and save the data mart table in a warehouse ofyour choice. After you create a data mart table, you can add it to a project anduse it as a source table.

    Common applications for data marts include:

    Creating aggregate fact tables

    Creating tables for very large result sets and then using other applicationssuch as Microsoft Excel or Microsoft Access to access the data

    Creating tables for off-line analysis

    In this lesson, you will use data marts to create aggregate fact tables.

    You can use data marts in other usage scenarios. Combining data martswith MicroStrategy data mining features or with Freeform SQL reportsare two such scenarios.

  • 7/25/2019 Advanced Project Design.pdf

    41/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Data Marts 41

    For example, consider the following scenario:

    Base Fact Table

    In this example, forecasting data is stored at the employee and date level in theFORECAST_SALES base fact table. However, you want to report on theForecast Unit Sold at the Region level. This requires three joins from the facttable to the LU_REGION lookup table. In addition, the FORECAST_SALEStable may have millions of rows. This query may be very costly, especially ifusers request it often.

    What if you could create an aggregate table that limits the number of joins andthe number of rows in the fact table? You can achieve this by creating a datamart table. You can then bring this table into your project, map the ForecastUnit Sales and metric to it, and have your region-level reports automaticallyuse it, as shown below:

    Aggregate Fact Table Created as Data Mart

  • 7/25/2019 Advanced Project Design.pdf

    42/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    42 Data Marts 2014 MicroStrategy Inc.

    Data Mart Objects

    Creating data marts involves creating two objects:

    Data mart reportThis is a metadata object that you create in the ReportEditor. When executed, the data mart report creates the data mart table inthe warehouse of your choice. The data mart report contains attributes,metrics, and other application objects that translate into columns in thedata mart table.

    Data mart tableThis is the relational table created after the execution of adata mart report.

    Data Mart Database Instances

    When you create a data mart report, you must specify a database instance inwhich to create the data mart table.

    You create a data mart in a database instance in one of the following ways:

    Option 1Use the projects primary database instance.

    Option 2Use a secondary project database instance that exists in the samewarehouse as the primary project database instance.

    Option 3Use a different database instance than the project, and one thatis in a different warehouse than the primary project database instance.

  • 7/25/2019 Advanced Project Design.pdf

    43/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Data Marts 43

    The following figure illustrates each of these data mart database instanceoptions:

    Data Mart Database Instance Options

    If you use the primary project database instance, then you do not need to takeany additional steps to create a data mart. You simply select the primary datamart database instance as a target when you create the data mart report.

  • 7/25/2019 Advanced Project Design.pdf

    44/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    44 Data Marts 2014 MicroStrategy Inc.

    If you plan to use a secondary project database instance, then you must createthat database instance before creating the data mart. You then associate thisdatabase instance to the project in the Project Configuration Editor.

    For instructions on how to associate a secondary database instance to aproject, see To associate a secondary database instance with a project:starting on page 30.

    Data Mart Optimization

    When you associate a secondary database instance to a project in the ProjectConfiguration Editor, a message window displays prompting you to configuredata mart optimization:

    Data Mart Optimization Warning Message

    This message does not display if you have enabled data mart

    optimization for the data mart database instance before you associatedthis database instance to a project.

    When you click Yes, the Database Instances editor for the data mart databaseinstance opens with the Advanced tab automatically selected.

    Data mart optimization occurs when you create a data mart in theprimary project database instance or in a database instance that pointsto the same data warehouse as the primary project database instance.

    To optimize a database instance:

    1 In the Database Instances editor, on the Advanced tab, under Data martoptimization, select the This database instance is located in the samewarehouse as check box.

  • 7/25/2019 Advanced Project Design.pdf

    45/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Data Marts 45

    If the data mart database instance does not reside in the samewarehouse as the project database instance, do not select this checkbox.

    2 In the list of database instances, select the primary project databaseinstance.

    3 Click OK.

    The following image shows the data mart optimization option for the ForecastData database instance residing in the same warehouse as the Tutorial Data:

    Data Mart Optimization Option

    Why Optimize?

    When you create a data mart using the primary project database instance orusing a database instance that resides in the same warehouse as the primaryproject database instance, you simplify the SQL that is generated to create thedata mart. You also conserve the Intelligence Server machine resources byminimizing the memory footprint.

  • 7/25/2019 Advanced Project Design.pdf

    46/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    46 Data Marts 2014 MicroStrategy Inc.

    The following table displays sample SQL generated when creating a data martusing a database instance in the same data warehouse as the primary projectdatabase instance, and when using a different data warehouse:

    When you create the data mart in the same data warehouse, MicroStrategyIntelligence Server creates the data mart table in the project warehouse andthen inserts the result data rows directly into the table.

    When you create the data mart in a different data warehouse, MicroStrategyIntelligence Server extracts the results from the project data warehouse with aSELECT statement and brings the result set into the Intelligence Servermachines memory. It then creates the data mart table in the different datawarehouse and inserts the results.

    Creating Data Marts

    In Developer, you create a data mart report by converting an existing report orby creating a new report.

    Sample SQL

    Same Data Warehouse Different Data Warehouse

    drop table Same_ Datamart _Instance

    create table Same_ Datamart _Instance

    (Month_Id INTEGER, Month_Desc

    VARCHAR(100), DOLLARSALES FLOAT)

    insert into Same_Datamart_Instance

    select a11.Month_Id Month_Id,

    max(a12.Month_Desc) Month_Desc,

    sum(a11.Tot_Dollar_Sales) DOLLARSALES

    from MNTH_CATEGORY_SLS a11

    join LU_MONTH a12 on (a11.Month_Id =

    a12.Month_Id)

    select a11.Month_Id Month_Id,

    max(a12.Month_Desc) Month_Desc,

    sum(a11.Tot_Dollar_Sales) DOLLARSALES

    from MNTH_CATEGORY_SLS a11

    join LU_MONTH a12

    on (a11.Month_Id = a12.Month_Id)

    group by a11.Month_Id

    drop table Different_ Datamart _Instance

    create table Different_ Datamart _Instance

    (Month_Id INTEGER, Month_Desc

    VARCHAR(100), DOLLARSALES FLOAT)

    insert into Different_ Datamart _Instance

    values 201201, 'Jan 2012', 8817)

  • 7/25/2019 Advanced Project Design.pdf

    47/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Data Marts 47

    To create a data mart:

    1 In the Report Editor, on the Data menu, select Configure Data Mart.

    The report template must contain an attribute, a metric, or someother object for this option to be enabled.

    2 In the Report Data Mart Setup window, on the General tab, in the Datamart database instance drop-down list, select the database instance inwhich you want to create the data mart table.

    3 In the Table name box, type the name of the data mart table you want tocreate.

    The table name you type is not validated by the system at this point.By default, the This table name contains placeholders check box is selected.The selection of this check box enables you to specify whether the data marttable uses placeholders to name the table. Placeholder names enable you tomodify table names dynamically.

    The following table lists placeholders available for naming data mart tables

    .

    Data Mart Placeholders

    Placeholder Replacement Option

    !U user name

    !D date on which table was created

    !O report name

    ??? temporary table name

    !!! all column names

    !a attribute column names

    !j job ID

    !r report GUID

    !t timestamp

    !p project name

    !z project GUID

    !s user session GUID

  • 7/25/2019 Advanced Project Design.pdf

    48/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    48 Data Marts 2014 MicroStrategy Inc.

    4 Select one of the following options:

    Create a new table

    Append to existing tableThis option enables you to add the datamart report results to an existing table. The name specified in the Table

    name box must be the name of the existing table you want to append.

    5 On the Advanced tab, specify data mart governors and table creationproperties.

    6 On the SQL Statements tab, specify SQL statements that can be insertedbefore and after the table is created or before data is inserted in the table.

    For information on the data mart governors, table creationproperties, and SQL statements refer to theAdvanced ReportingGuideproduct manual.

    7 Click OK to close the Report Data Mart Setup window.

    You may see a warning that data mart tables created in common tablespaces may overwrite someone elses data mart table. If you want toproceed, click OK.

    8 Save the report.

    9 Execute the data mart report to create the data mart table.

    10 Update project schema.

    For example, using the Forecasting Project you can create a data mart reportthat contains the Region and Year attributes and the Forecast Units Soldmetric, as shown in the image below:

    Data Mart Report Definition

  • 7/25/2019 Advanced Project Design.pdf

    49/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Data Marts 49

    You can then convert this report into a data mart. The following image showsthe Report Data Mart Setup Window with data mart report configured asREGION_YEAR_FORECAST_UNIT_SALES table in the Forecast Datadatabase instance:

    Report Data Mart Setup Window

    The following image shows a message displayed by the data mart report whenit is executed:

    Data Mart Execution Complete Message

  • 7/25/2019 Advanced Project Design.pdf

    50/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    50 Data Marts 2014 MicroStrategy Inc.

    Data Mart Options

    A data mart table has the same structure as any other data warehouse table. Bydefault, it contains columns corresponding to all attribute forms and metriccolumns present on the report template.

    You can control the structure of a data mart table in the following ways:

    You can control what attribute columns are included in the data mart table.

    You can determine the names for the columns that contain the metriccalculations.

    Attribute Columns

    A data mart table contains an attribute ID column for each attribute selected inthe data mart report. Additionally, depending on the default display for eachattribute in the data mart report, the data mart table can also include attributedescription columns.

    Generally, you would remove any non-ID form descriptions from thedata mart report display to avoid storing duplicate attributedescriptions in the data mart table.

    Consider the data mart report from the previous example that has the Regionand Year attributes and the Forecast Units Sold metric on the template.

    Assuming that the default display for the Region attribute is ID anddescription, and for Year is ID, when the data mart report is executed, the datamart table contains the following columns:

    REGION_ID

    REGION_NAME

    YEAR_ID

    WJXBFS1

    If you do not want to include attribute description columns in your data marttable to improve query performance, you must modify the attribute display andforms available in report objects for each attribute in the data mart report.

  • 7/25/2019 Advanced Project Design.pdf

    51/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Data Marts 51

    To modify the attribute display in a data mart report:

    1 In the Report Editor, on the Data menu, select Attribute Display.

    2 In the Attribute Display window, in the Attribute drop-down list, select theattribute whose display you want to modify.

    3 Under Select one of the display options below, click Use the followingattribute forms.

    4 In the Available forms list, select the IDform.

    5 Click the upper >button to move the ID form to the Displayed forms list.

    6 In the Displayed forms list, select all non-ID forms.

    7 Click the upper

  • 7/25/2019 Advanced Project Design.pdf

    52/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    52 Data Marts 2014 MicroStrategy Inc.

    The following image shows the Attribute Display window with the Regionattribute configured to use only the ID form:

    Attribute Display Options

  • 7/25/2019 Advanced Project Design.pdf

    53/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Data Marts 53

    Using the previous example, after you change the display for the Regionattribute 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

    Metric Column Alias

    A data mart table contains a column that corresponds to each metric selectedin the data mart report. These columns, created from metric calculations,become the fact columns.

    By default, the alias generated for a fact column in a report SQL is

    WJXBFS, where n is a number. The first metric alias MicroStrategy Enginecreates for a report is WJXBFS1, the next WJXBFS2, and so forth.

    If you want to use a different name, you can create a column alias for the factcolumn that contains the metric calculation.

    You specify the column alias in the Metric Editor of the metric on which thecolumn is based.

    To name a fact column in a data mart table:

    1 In the Metric Editor, on the Tools menu, point to Advanced Settingsandselect Metric Column Options.

    2 In the Metric Column Alias Optionswindow, in the Column Name used intable SQL creation box, type a name for the metric column.

    3 In the Data type drop-down list, select the data type and, if appropriate,define other relevant parameter setting(s).

  • 7/25/2019 Advanced Project Design.pdf

    54/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    54 Data Marts 2014 MicroStrategy Inc.

    4 Click OKto close the Metric Column Alias Options window.

    5 Save and close the metric.

    6 Update project schema.

    The following image shows a custom Total_Unit_Sales column alias for theForecast Units Sold metric:

    Metric Column Alias Options Window

    Using the same example, after you change the column alias for the ForecastRevenue metric, and then execute the data mart report, the data mart tablecontains the following columns:

    REGION_ID

    YEAR_ID

    Total_Unit_Sales

    Using Data Marts in a Project

    After you create the data mart report and execute it, the data mart table (withreport result set) is created in the data warehouse. This table is like any other

    physical data warehouse table.

    To use a data mart table as a source table in the project in which the data martwas created, you must first add the table to the project, then update theappropriate fact, and finally update the project schema.

  • 7/25/2019 Advanced Project Design.pdf

    55/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Data Marts 55

    Adding the Data Mart table to the Project:

    1 In Developer, on the Schema menu, select Architect.

    2 On the Warehouse Tables pane, expand the Forecast Data. You can now seethe data mart table.

    3 Right-click the data mart table and select Add Table to Project.

    4 The Results Preview window shows attributes and facts that will be created.In the Results Preview window, in the Fact tab, clear the check box for thefacts.

    There might be scenarios where you want to keep the facts. If you wantto create facts, ensure you select the appropriate fact check box in theFact tab of the Results Preview window.

    5 Click OK.

    6 On the toolbar, click Save and Close.

    The following image shows the REGION_YEAR_FORECAST_UNIT_SALEStable added to the project:

    REGION_YEAR_FORECAST_UNIT_SALES Added to the Project

    Updating the Fact

    To use the data mart table as a source table from which to execute reports, youmust update the fact on which the metric used to create the data mart table isbased.

  • 7/25/2019 Advanced Project Design.pdf

    56/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    56 Data Marts 2014 MicroStrategy Inc.

    To update the fact expression:

    1 In Architect graphical interface, edit the fact that is used in the metric of thedata mart report.

    The relationship of the metric to the fact on which it is based isreferred to as a child dependency. In Developer, you can useMicroStrategy Object Manager to quickly locate child dependenciesfor the metric.

    2 In the Project Tables view tab, locate the table that contains the fact andright-click to edit the fact on which the data mart metric is based.

    3 In the Fact Editor, create a new fact expression that uses the data mart tableas a source table.

    If the fact column in the data mart table is named the same as theunderlying fact, you may select the Automatic mapping method for thenew fact expression. By default, when you create a data mart table, thefact has a unique name that is different from the other facts in theproject.

    4 Click OK.

  • 7/25/2019 Advanced Project Design.pdf

    57/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Data Marts 57

    The following image shows the Forecast Units Sold fact mapped to the datamart aggregate table:

    Mapping a Fact to a Data Mart Table

    Updating the Project Schema

    After you add the data mart table to a project and update the appropriate factobject, you must also update the schema logical information in the metadata.

  • 7/25/2019 Advanced Project Design.pdf

    58/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    58 Lesson Summary 2014 MicroStrategy Inc.

    Lesson Summary

    In this lesson, you learned:

    The database instance you select during the project creation processbecomes this projects primary database instance.

    You can associate any number of secondary database instances with a singleproject. You use secondary database instances to create data marts,Freeform SQL, Query Builder, and MDX reports. You associate secondarydatabase instances with a project using the Project Configuration Editor.

    The Warehouse Tables pane in Architect graphical interface enables you to

    maintain the integrity of the logical tables with the data warehousestructure by providing a variety of options that apply to the project tableson an individual basis.

    Base fact tables are tables that store a fact or set of facts at the lowestpossible level of detail. Aggregate fact tables are tables that store a fact orset of facts at a higher, or summarized, level of detail.

    To use aggregate tables in the project, you first add the table to the projectusing the Warehouse Tables pane in Architect graphical interface. Ifnecessary, you also map the existing attributes and facts to the aggregate

    table.

    MicroStrategy Architect assigns a logical table size to every table in aproject when you initially add them to the project and stores these sizeassignments in the metadata. It assigns sizes based on the columns in thetables and the attributes to which those columns correspond.

    Logical table size is the sum of the weight for each attribute contained in thetable. Attribute weight is defined as the position of an attribute in itshierarchy divided by the number of attributes in the hierarchy multiplied bya factor of 10.

    You can change the logical table size either in the Logical Size Editor orfrom the Properties pane in Architect graphical interface.

    A data mart is a relational table containing a report result set. A data martconsists of two objects: the data mart report and the data mart table.

    You can use data marts to create aggregate tables and tables based on largereport result sets.

  • 7/25/2019 Advanced Project Design.pdf

    59/236

    MicroStrategy Architect: Advanced Project Design Managing Project Schema 2

    2014 MicroStrategy Inc. Lesson Summary 59

    Data mart reports are created in the Report Editor of a new or existingreport. After you execute the data mart report, the data mart table is createdin the chosen warehouse.

    You can choose to create only attribute ID columns in the data mart table byremoving all non-ID forms from the attribute display and report objects in

    the data mart report.

    For the columns in the data mart table that contain metric calculations, youcan use the existing metric name as the column name or you can create anew column alias.

    To use a data mart table in a project, you must add it to the project using theWarehouse Tables pane in Architect graphical interface, update thecorresponding fact, and then update the project schema.

  • 7/25/2019 Advanced Project Design.pdf

    60/236

    Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    60 Lesson Summary 2014 MicroStrategy Inc.

  • 7/25/2019 Advanced Project Design.pdf

    61/236

    MicroStrategy Architect: Advanced Project Design Exercises: Managing Project Schema 2

    2014 MicroStrategy Inc. Exercises: Managing Project Schema 61

    Exercises: Managing Project Schema

    Forecasting Project Information

    You should complete the following exercises using the Forecasting Project,which is found in the MicroStrategy Analytics Modules project source. Thelogical data model and schema for this project are included with the exercises.You need to review this information before beginning the exercises.

    You will also use the Forecasting Project to complete other exercises

    throughout this course.

    The Forecasting Project is based on the following logical data model:

    Forecasting Project Logical Data Model

    The Forecasting Project consists of several attributes in the Time andGeography hierarchies. The attributes in both hierarchies are indirectly relatedto each other through the fact tables.

  • 7/25/2019 Advanced Project Design.pdf

    62/236

    Exercises: Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    62 Exercises: Managing Project Schema 2014 MicroStrategy Inc.

    The attributes in the Time hierarchy are the following:

    Attributes in the Time Hierarchy

    The attributes in the Geography hierarchy are the following:

    Attributes in the Geography Hierarchy

  • 7/25/2019 Advanced Project Design.pdf

    63/236

    MicroStrategy Architect: Advanced Project Design Exercises: Managing Project Schema 2

    2014 MicroStrategy Inc. Exercises: Managing Project Schema 63

    The schema for this project consists of the following lookup tables:

    Lookup Tables

    The schema for this project consists of the following fact tables:

    Fact Tables

    The data warehouse for the Forecasting Project contains additionaltables. You will bring some of those tables into the MicroStrategyTutorial project later in this course.

  • 7/25/2019 Advanced Project Design.pdf

    64/236

    Exercises: Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    64 Exercises: Managing Project Schema 2014 MicroStrategy Inc.

    Create an Aggregate Table Using Data Mart

    In this exercise, you will first create a REGION_FORECAST_SALES aggregatetable using the data mart feature in the Forecasting Project. You will then bringthis table to the project and test how the Engine selects the fact table based on

    the logical table size.

    Before you create a data mart, you will first modify the Forecast Revenuemetric to use a custom Forecast_Revenuecolumn alias. You will then create adata mart report with Region ID and Quarter ID attribute forms and theForecast Revenueand Forecast Units Sold metrics on the template. Namethe data mart table REGION_FORECAST_SALES. Save the data mart reportas Regional Forecast Revenuein the Public Objects\Reports folder.

    Next, you will add the table to the Forecasting Project. Then, you will create anew fact expression for the Forecast Revenue fact that uses the

    Forecast_Revenuecolumn in the REGION_FORECAST_SALEStable. Youwill also create and run a Data Mart Test report with the Regionattribute andthe Forecast Revenuemetric on the template to confirm that the ForecastRevenue fact uses the REGION_FORECAST_SALES table.

    Finally, you will change the logical table size for theREGION_FORECAST_SALEStable to 30and run the Data Mart Test reportto view the impact of your change on the report SQL.

    You can use the detailed instructions if you want help.

    Detailed Instructions

    Modify metric alias

    1 In Developer, log in to the MicroStrategy Analytics Modules project sourceas Administratorand leave the password blank.

    2 Open the Forecasting Project.

    3 In the Public Objects folder, in the Metrics folder, edit the ForecastRevenuemetric.

    4 In the Metric Editor, on the Tools menu, point to Advanced Settingsandselect Metric Column Options.

    5 In the Metric Column Alias Optionswindow, in the Column Name used intable SQL creation box, type Forecast_Revenue.

  • 7/25/2019 Advanced Project Design.pdf

    65/236

    MicroStrategy Architect: Advanced Project Design Exercises: Managing Project Schema 2

    2014 MicroStrategy Inc. Exercises: Managing Project Schema 65

    6 Click OK to close the Metric Column Alias Optionswindow.

    7 Save and close the metric.

    8 If you did not edit Forecast Units Sold during the lesson with yourinstructor, repeat steps 3 to 7 for the Forecast Units Sold metric so theColumn Name used in table SQL creation box is Total_Units_Sales.

    Create the Data Mart report

    9 In the Public Objects folder, in the Reports folder, create the followingreport:

    You can access the Region attribute from the Geography hierarchy.You can access the Quarter attribute from the Time hierarchy. TheForecast Revenue and Forecast Units Sold metrics are located in theMetrics folder.

    Configure attribute display options

    10 In the Report Editor, on the Data menu, select Attribute Display.

    11 In the Attribute Display window, in the Attribute drop-down list, ensurethat Regionis selected.

    12 Under Select one of the display options below, click Use the followingattribute forms.

    13 In the Available forms list, select the IDform.

    14 Click the upper >button to move the ID form to the Displayed forms list.

    15 In the Displayed forms list, select the DESCform.

    16 Click the upper

  • 7/25/2019 Advanced Project Design.pdf

    66/236

    Exercises: Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    66 Exercises: Managing Project Schema 2014 MicroStrategy Inc.

    18 Click the lower button to move the ID form to the Displayed forms list.

    23 In the Displayed forms list, select the DESCform.

    24 Click the upper

  • 7/25/2019 Advanced Project Design.pdf

    67/236

    MicroStrategy Architect: Advanced Project Design Exercises: Managing Project Schema 2

    2014 MicroStrategy Inc. Exercises: Managing Project Schema 67

    After the report executes, you see a message that the result data has beenstored in the REGION_FORECAST_SALES table, as shown below:

    35 Close the report.

    Incorporate the data mart table into the project

    36 In Developer, on the Schema menu, select Architect.

    37 In the Read Only window, select Edit: This will lock all schema objects inthis project from other users.

    38 Open the Architect graphical interface, click Project Tables View tab.

    39 Disable automatic metric creation.

    Automatic metric creation can be changed by clicking Architect button,selecting Settings, clicking the Metric Creation tab, and clearing Sumcheck box.

    40 In the Warehouse Tables pane, in the Forecast Data database instance,right-click the REGION_FORECAST_SALEStable and select Add Tableto Project.

    41 In the Results Preview window, in the Fact tab, clear the Forecast Revenue

    and Total Unit Sales check boxes.

    42 Click OK.

    Update the Forecast Revenue fact

    43 In the Project Tables View tab, find the FORECAST_SALES table and selectthe Forecast Revenuefact.

  • 7/25/2019 Advanced Project Design.pdf

    68/236

    Exercises: Managing Project Schema MicroStrategy Architect: Advanced Project Design2

    68 Exercises: Managing Project Schema 2014 MicroStrategy Inc.

    44 Right-click the Forecast Revenuefact and select Edit.

    45 In the Fact Editor, create a