building bi data models with deep see

57
Building BI Data Models with DeepSee Kenneth Poindexter, Michael Braam March 2011

Upload: intersystems-corporation

Post on 30-May-2015

556 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Building BI Data Models With Deep See

Building BI Data Models with DeepSee

Kenneth Poindexter, Michael BraamMarch 2011

Page 2: Building BI Data Models With Deep See

• BI component of Caché and Ensemble

– Embedded Real-Time Business Intelligence

• Available since Caché 2009.1

– New release available with Caché 2011.1

– All academies based on the 2011.1 version

• Integrated User Interface and API

– Light-weight browser-based user interface

– Standardized API for BI data access

DeepSee

Page 3: Building BI Data Models With Deep See

Academy Outline

• DeepSee Data Modeling

– Cubes

– Subject Areas

– KPI’s

Page 4: Building BI Data Models With Deep See

Accessing DeepSee

• Use Firefox as the browser

– DeepSee can be accessed from different browsers.

• Firefox, Internet Explorer and Chrome

– Within Firefox, click one of the three shortcuts in the browser’s toolbar

• From your Desktop

– Click on one of the shortcuts provided.

Page 5: Building BI Data Models With Deep See

Demonstration

• What a cube can do for you?

Page 6: Building BI Data Models With Deep See

Exercises (Shortcuts and Hints)

C:\Academy Files\DSMODEL Exercises.pdf

Contains a pdf copy of the exercise guide. For those of us that are visually challenged.

C:\Academy Files\Code.txt

Anyplace in the exercise guide where you find code that you have to type in, you can find that code in this file for easy copying and pasting.

C:\Academy Files\Completed Exercises

When all else fails…..

Page 7: Building BI Data Models With Deep See

Cube

A data structure that allows fast analysis of data from different perspectives.

Page 8: Building BI Data Models With Deep See

Cube

A data structure that allows fast analysis of data from different perspectives.

Region Product Year Units

Europe Candy 2011 12

Europe Candy 2010 6

Europe Candy 2009 2

Normal Two Dimensional View

Page 9: Building BI Data Models With Deep See

Cube

A data structure that allows fast analysis of data from different perspectives.

Region Product Year Units

Europe Candy 2011 12

Europe Candy 2010 6

Europe Candy 2009 2

Normal Two Dimensional View

Fruit

Candy

Chips

2011 2010 2009

AsiaN America

Europe

View using a Cube

12 6 2

Page 10: Building BI Data Models With Deep See

Cube

A data structure that allows fast analysis of data from different perspectives.

Fruit

Candy

Chips

2011 2010 2009

AsiaN America

Europe

View using a Cube

12 6 2

Page 11: Building BI Data Models With Deep See

Cube: Dimensions and Measures

A data structure that allows fast analysis of data from different perspectives.

Fruit

Candy

Chips

2011 2010 2009

AsiaN America

Europe

View using a Cube

12 6 2

Dimensions

Defines the

perspective

Product

Year Sold

Location

Measures

Defines what we

are analyzing

Units Sold

Sale Amount

Average

Discount

Page 12: Building BI Data Models With Deep See

Exercise 1: Create a New Cube

Page 13: Building BI Data Models With Deep See

Exercise 1: Create a New Cube

Key Concepts

• Every cube requires a unique name

• The Source Class is where DeepSee will get data for your cube. A cube is based on a single source class or its related data

• DeepSee cubes are stored in Cache classes.

Page 14: Building BI Data Models With Deep See

Dimension

A Dimension can be a value from our Source Class which we add to our cube in order to slice and dice, or view our data in different ways or from different perspectives.

Fruit

Candy

Chips

2011 2010 2009

N AmericaEurope

12 6 2Asia

Dimensions

Defines the

perspective

Product

Year Sold

Location

Page 15: Building BI Data Models With Deep See

Exercise 2: Dimensions from Properties

Page 16: Building BI Data Models With Deep See

Exercise 2: Dimensions from Properties

Key Concepts

• Dimensions must have unique names within the cube

• Dimensions are values used to analyze our data from different perspectives

• A dimension can be based upon a source property

• Any change made to a dimension requires you to compile and rebuild your cube.

Page 17: Building BI Data Models With Deep See

Measure

A Measure is a numerical value that defines what we are analyzing. Measures can be aggregated in different ways, such as Sum, Average, Minimum and Maximum

Fruit

Candy

Chips

2011 2010 2009

N AmericaEurope

12 6 2Asia

Measures

Defines what we

are analyzing

Units Sold

Sale Amount

Average

Discount

Page 18: Building BI Data Models With Deep See

Exercise 3: Measures from Properties

Page 19: Building BI Data Models With Deep See

Exercise 3: Measures from Properties

Key Concepts

• Measures are numerical values associated with the records from our source class that we want to analyze

• It is perfectly normal to use a source property as both a measure and a dimension

• Measures can be aggregated in different ways, such as Sum, Min, Max and Avg.

Page 20: Building BI Data Models With Deep See

Null Values

A null is a property within your database that does not have a value. DeepSee indexes null values.

Page 21: Building BI Data Models With Deep See

Null Values

A null is a property within the database that does not contain a value. DeepSee indexes null values.

<null> Meaning

Page 22: Building BI Data Models With Deep See

Exercise 4: Null Replacement

Page 23: Building BI Data Models With Deep See

Exercise 4: Null Replacement

Key Concepts

• Null values are properties within our source class that do not have a value.

• By default, DeepSee displays null values as <null>

• Null Value does not necessarily = no meaning

• A default null replacement string can be set at the cube level

• Null replacement strings on levels override the null replacement string from the cube.

Page 24: Building BI Data Models With Deep See

Ranges

What is a range

• A range is a grouping of one or more values into buckets of lesser number.

Page 25: Building BI Data Models With Deep See

Ranges

No Discount

• 0%

1-19%

• 5%

• 6.5%

• 8%

• 10%

• 14.5%

• 15%

• 18%

• 18.5%

20-49%

• 21.5%

• 22%

• 25%

• 31%

• 36.5%

• 40%

• 42%

• 45.2%

• 49%

50%+

• 51.2%

• 68%

• 72.1%

• 80%

• 81%

• 82%

• 91%

• 92.5%

Discounts

Grouped Into

Meaningful

Ranges

What is a range

• A range is a grouping of one or more values into buckets of lesser number.

Page 26: Building BI Data Models With Deep See

Ranges

Age

Grouped Into

Age Groups

• 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17Pediatric

• 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3018-30

• 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 5031-50

• 51, 52, 53, 54. 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70…51+

What is a range

• A range is a grouping of one or more values into buckets of lesser number.

Page 27: Building BI Data Models With Deep See

Exercise 5: Range Expressions

Page 28: Building BI Data Models With Deep See

Exercise 5: Range Expressions

Key Concepts

• Range Expressions allow us to group values that would otherwise be difficult to manage into smaller more manageable range sets

• Each Range has a From value, a To value and a Replacement Value

• The From and To values can be exclusive or inclusive.

Page 29: Building BI Data Models With Deep See

Dimension Hierarchies and Levels

Multiple levels define their members in order of detail, with each level becoming more detail than the level before.

Page 30: Building BI Data Models With Deep See

Dimension Hierarchies and Levels

Multiple levels define their members in order of detail, with each level becoming more detail than the level before.

Page 31: Building BI Data Models With Deep See

BeijingShanghaiBangaloreMumbaiOsakaTokyo

Hierarchy

Dimension Hierarchies and Levels

Outlet Region Country City

AntwerpBrusselsLondonMancheste

rNiceParisBerlin

Asia

S. America

ChinaIndiaJapan

Europe BelgiumEngland

FranceFrankfurtGermany

MunichAmsterda

m

Netherland

s BarcelonaSpain MadridMontrealTorontoVancouverAtlantaBostonChicagoHoustonLos

AngelesNew YorkSeattle

CanadaUSA

N. America

BrasiliaBrazil Rio de

JaneiroSantiagoSao PaoloChile

Each dimension level contains Members that are tree-like organized.

Page 32: Building BI Data Models With Deep See

Exercise 6: Multiple Levels and Hierarchies

Page 33: Building BI Data Models With Deep See

Exercise 6: Multiple Levels and Hierarchies

Key Concepts

• DeepSee dimensions can contain multiple hierarchies and multiple levels within each hierarchy

• Levels must be organized into a tree structure where each level contains all of the members of the next lower level.

Page 34: Building BI Data Models With Deep See

Time Dimensions

Time dimensions are dimensions which give us information from the perspective of time or date.

Page 35: Building BI Data Models With Deep See

Exercise 7: Time Dimensions

Page 36: Building BI Data Models With Deep See

Exercise 7: Time Dimensions

Key Concepts

• Time dimensions follow the same rules as other multi-level dimensions. They must be organized in a way that presents a parent-child relationship.

• DeepSee provides Functions which allow us to extract specific portions of date and time fields.

• Time isn’t always on our side.

Page 37: Building BI Data Models With Deep See

Changing our Thought Process…

Most of the time when we begin building a data model, it’s habit to look at our source data and say, “What data do I have available to analyze.”

Measures

Dimensions

• Unit Sold

• Amount of Sale

• Avg Sales Amount

• Min Sales Amount

• Max Sales Amount

• Date of Sale

• Channel

• Outlet

• Product

• Category

• name

Page 38: Building BI Data Models With Deep See

Changing our Thought Process…

I propose a new way of thinking. Instead of saying, “What do I have to analyze?” Say to yourself, “How do I want to analyze?” And then say, “How can I get it?”

Measures

Dimensions

• Unit Sold

• Amount of Sale

• Avg Sales Amount

• Min Sales Amount

• Max Sales Amount

• Avg Unit Amount

• Max Unit Amount

• Min Unit Amount

• Cases sold

• Date of Sale

• Channel

• Outlet

• Product

• Category

• Name

• Comment

• Type

• Comment

• SKU Category

• Sales Person’s Age

Page 39: Building BI Data Models With Deep See

Exercise 8: Measures from Expressions

Page 40: Building BI Data Models With Deep See

Exercise 9: Levels from Expressions

Page 41: Building BI Data Models With Deep See

Review: Expressions

Key Concepts

• Change the way we think about the elements that will go into our data model.

• We can use source expressions to create new measures and dimensions that are not contained directly in the properties of our source class.

• We can use any Cache ObjectScript expression, which includes basic expressions as well as calls to external class methods which extend our possibilities endlessly.

Page 42: Building BI Data Models With Deep See

Level Properties

Are values that are associated with the level to which they belong.

City Possible

Properties

Population

Mayor

Registered Dogs

Or any other

value that might

be associated

with a particular

city

Page 43: Building BI Data Models With Deep See

Level Properties

Are values that are associated with the level to which they belong.

Within DeepSee, they can be used in different ways:

• As the name of the members of the level they belong

• To sort the members of the level they belong.

• Much like a measure in the Columns box within Analyzer

Page 44: Building BI Data Models With Deep See

Exercise 10: Level Properties

Page 45: Building BI Data Models With Deep See

Exercise 10: Level Properties

Key Concepts

• Level properties are used to provide additional information about the member of a level to which it belongs.

• They can be used to sort the members, or as the name of the members of the level to which it belongs.

• Level properties can be both source property and source expression based.

Page 46: Building BI Data Models With Deep See

Detail List

A Detail List allows us to drill to the detail information about the records which make up a given aggregated value.

Page 47: Building BI Data Models With Deep See

Detail List

A Detail List allows us to drill to the detail information about the records which make up a given aggregated value.

Page 48: Building BI Data Models With Deep See

Exercise 11: Detail Lists

Page 49: Building BI Data Models With Deep See

Exercise 11: Detail Lists

Key Concepts

• Allows drill-down to the detail records which make up a given aggregated value or set of values

• Is based on a SQL statement, executed at run-time

Page 50: Building BI Data Models With Deep See

Subject Area

A subset of a cube.

• Filters the records returned by queries without having to explicitly define the filter within the query

• Filters the cube elements available to the end user

• Allows cube elements to be modified and renamed.

Fruit

Candy

Chips

2011 2010 2009

AsiaN America

Europe

12 6 2

Page 51: Building BI Data Models With Deep See

Subject Area

A subset of a cube.

• Filters the records returned by queries without having to explicitly define the filter within the query

• Allows cube elements to be hidden from the end user

• Allows you change the display name.

Candy

Chips

2010 2009

6 2

Los Angeles

Orlando

Page 52: Building BI Data Models With Deep See

Exercise 12: Subject Areas

Page 53: Building BI Data Models With Deep See

Exercise 12: Subject Areas

Key Concepts

• Provide the ability to filter the records available to the user

• Provider the ability to limit access to measures, dimensions and listings as well as modify their display names.

• Enables us to secure our data by requiring a specific resource to access the subject area.

Page 54: Building BI Data Models With Deep See

Academy Review

• Cubes

– Measures

– Dimensions

• Subject Areas

• KPIs

Page 55: Building BI Data Models With Deep See

Review: More Information

• Exploring and Presenting Data with DeepSee

– Tuesday 4:00PM

– Wednesday 9:00AM

• Building BI Data Models with DeepSee

– Monday 2:00PM

– Tuesday 1:30PM

• Using MDX in DeepSee

– Tuesday 10:00AM

– Wednesday 11:15AM

Page 56: Building BI Data Models With Deep See

Review: More Information

• Developers Room

• Cache Documentation

– Defining and Building DeepSee II Models

– Getting Started with DeepSeeIntroduction

– DeepSee II Implementation GuideImplementation

– Developer Tutorial Step-by-Step

Page 57: Building BI Data Models With Deep See

Building BI Data Models with DeepSee

Kenneth Poindexter, Michael BraamMarch 2011