Sunteți pe pagina 1din 24

Best Practices for Multi-Dimensional

Design using Cognos 8 Framework


Manager
Bruce Zornes
The Boeing Company
Business Intelligence & Competency Center

Copyright © Boeing 2007. All rights reserved


Best Practice: Knowledge and Experience

ƒ Use Best Practice to reduce cost and produce quality


ƒ Best Practice means
ƒ Knowledge about the solution
ƒ Theory is OK if produces results
ƒ Use Patterns – re-apply Knowledge
ƒ Experience with the tools
ƒ How to, what to do, when to do it
ƒ People have Experience and Knowledge

Copyright © Boeing 2007. All rights reserved


Best Practice: Use Design Principals

ƒ Design quality in rather than Testing it in


ƒ Framework Manager model is great place to
implement quality design
ƒ Understand the business case and drivers
ƒ Understand the data schema - 3NF, star, recursive
ƒ Understand the technology for optimization
ƒ Teaming – include DBA’s and Server Admins
ƒ Common model and keep it simple
ƒ Understand your customer – reports team too

Copyright © Boeing 2007. All rights reserved


Best practices: Measures for success - Project

ƒ Success criteria checklist – expectations, funding,


resources
ƒ Complete solution – phase the release(s)
ƒ Our case: 11 business units, 20 cubes, one model, 4 rels
ƒ Follow a process – DevÆTestÆProd, CM, docs, SQA
ƒ Design reviews and open communication
ƒ Customer acceptance – requirements met
ƒ End-user acceptance – navigation and UI, portals
ƒ Cost and schedules – hidden cost, unplanned work
ƒ Reports performance – team collaboration
ƒ Support and operations team – training, procedures

Copyright © Boeing 2007. All rights reserved


Customer Requirements: Business case

ƒ How to produce quality – criteria for design?

Design choices:
Star schema
Narrow fact
Three tables
layer
Familiar
design
navigation

Nice Fast query


theory response rqmt
Minimize load
Too slow time ETL
for large
Reporting mart
data?

Copyright © Boeing 2007. All rights reserved


Best Practice: Framework Model Design

ƒ Framework Model Three layer design


ƒ • [Physical Database Layer]
ƒ SQL data source objects
ƒ • [Business Model Layer]
ƒ Model objects and building blocks
ƒ Business rules and data logic
ƒ • [Dimensional Presentation Layer]
ƒ Multi-dimensional views and format

Copyright © Boeing 2007. All rights reserved


Data Design: Parent-Child to Denormal table

ƒ PARENT- CHILD tree

ƒ Denormalized
table for
Reporting

Note: Non-proprietary ‘scrubbed’ test data


Copyright © Boeing 2007. All rights reserved
Framework model: Construct model objects

ƒ Building blocks: parent-child Query Subjects (QS) and Query Sets


Generation Specific QS
Shortcut to
physical
Namespace
scope Explicit
relationship

QS building
Folders block
organize
Placeholder
Parents QS
Naming
convention Query Set
Union
User Leaf
Naming for members
Reports
Copyright © Boeing 2007. All rights reserved
Framework Model: Core Design Elements

ƒ Conformed star schema (multiple fact tables)


ƒ Parent-child to denormal dimension tables
ƒ Unbalanced hierarchies
ƒ Building block Query Subjects (QS)
ƒ Parent place-holders at each generation
ƒ Unions via Querysets: QSParent to QSGen
ƒ Create leaf member level – coalesce(case when)
ƒ Link dimensions to facts at leaf level
ƒ Narrow fact table - one key per dim
ƒ Create dimensional views from building blocks
Copyright © Boeing 2007. All rights reserved
Framework model: with SQL Generation

ƒ Building blocks: Generate Top-of-Tree SQL

with
E123_SCENARIO21 as Primary
(select
E123_SCENARIO.ESB_FKID, reference to
E123_SCENARIO.ESB_PARENT,
E123_SCENARIO.ESB_CHILD,
PARENT-
Cognos E123_SCENARIO.ALIAS1, CHILD
E123_SCENARIO.DATASTORE,
Connection E123_SCENARIO.GENERATION physical table
from
"FabFBI Datasource"..AFAB.E123_SCENARIO),
ScenarioGen2 as
(select
E123_SCENARIO21.ESB_FKID as ESB_FKID,
E123_SCENARIO21.ESB_PARENT as PARENT,
Schema
E123_SCENARIO21.ESB_CHILD as CHILD,
E123_SCENARIO21.ALIAS1 as ALIAS1,
owner
E123_SCENARIO21.DATASTORE as DATASTORE,
E123_SCENARIO21.GENERATION as GENERATION
from

where
E123_SCENARIO21 Top-of-Tree
(E123_SCENARIO21.GENERATION in ('2')) constraint
),

Copyright © Boeing 2007. All rights reserved


Framework model: SQL Magic for Placeholders

ƒ Building blocks: QuerySet union with placeholders SQL


ScenarioGen23Union517(ESB_FKID,
PARENT,
CHILD, Promote
ALIAS1,
DATASTORE, CHILD as
GENERATION) as
((select PARENT
E123_SCENARIO15.ESB_FKID as ESB_FKID,
‘NULL’ E123_SCENARIO15.ESB_CHILD as PARENT,
cast( null as varchar (80)) as CHILD,
types cast(null as varchar (80)) as ALIAS1,
‘NULL’ CHILD
cast(null as varchar (80)) as DATASTORE,
coerced E123_SCENARIO15.GENERATION as GENERATION
from
E123_SCENARIO15
where
(E123_SCENARIO15.GENERATION in ('2'))
Placeholder
) UNION Parents at Gen 2
(select
E123_SCENARIO16.ESB_FKID as ESB_FKID,
E123_SCENARIO16.ESB_PARENT as PARENT, UNION to
E123_SCENARIO16.ESB_CHILD as CHILD,
E123_SCENARIO16.ALIAS1 as ALIAS1,
E123_SCENARIO16.DATASTORE as DATASTORE, Members at Gen 3
E123_SCENARIO16.GENERATION as GENERATION
from
E123_SCENARIO16
where
(E123_SCENARIO16.GENERATION in ('3'))
) ),

Copyright © Boeing 2007. All rights reserved


Framework model: SQL tricks for Leaf members

ƒ Building blocks: coalesce(case(tree)) as LEAF_MEMBER

ScenarioLeaf as Case switch


(select
coalesce( to NOT
case when (ScenarioGen34Union18.CHILD is NULL) then null
else ScenarioGen34Union18.ESB_FKID end promote
,case when (ScenarioGen23Union19.CHILD is NULL) then null
else ScenarioGen23Union19.ESB_FKID end
placeholders
,case when (ScenarioGen2.CHILD is NULL) then null
else ScenarioGen2.ESB_FKID end
) as LEAF_FKID,

coalesce(
case when (ScenarioGen34Union18.CHILD is NULL) then null
else ScenarioGen34Union18.PARENT end
Walk trees ,case when (ScenarioGen23Union19.CHILD is NULL) then null
else ScenarioGen23Union19.PARENT end
in reverse ,case when (ScenarioGen2.CHILD is NULL) then null Build leaf
else ScenarioGen2.PARENT end
) as LEAF_PARENT, members
3Æ2Æ1
coalesce(ScenarioGen34Union18.CHILD
,ScenarioGen23Union19.CHILD
,ScenarioGen2.CHILD
) as LEAF_CHILD,
….

Copyright © Boeing 2007. All rights reserved


Framework model: Construct leaf and case logic

ƒ Building blocks: final assembly – leaf model objects

Placeholders Coalesce
promote Case switch
members

Coalesce is
No cross
tree walker
joins allowed!
Scan right to
first non-null
Model
objects need
relationships
Conditional
Leaf links to members
fact tables

Copyright © Boeing 2007. All rights reserved


Framework model: SQL loop joins

ƒ Building blocks: SQL loop joins w/placeholder filter


My ‘tricky’
Join-Join causes SQL?
ScenarioLeaf as
repeating output
….
(really just
from ANSI sql
ScenarioGen2
left outer join
F041-03
ScenarioGen23Union517 ScenarioGen23Union19 F041-05)
on (ScenarioGen2.CHILD = ScenarioGen23Union19.PARENT)
left outer join
ScenarioGen34Union214 ScenarioGen34Union18
on (ScenarioGen23Union19.CHILD = ScenarioGen34Union18.PARENT)
where (not (coalesce(
ScenarioGen34Union18.CHILD Put ‘em in &
,ScenarioGen23Union19.CHILD
,ScenarioGen2.CHILD) take ‘em out
is NULL)) )
Seems like
extra work for
unbalanced

Copyright © Boeing 2007. All rights reserved


Framework model: Determinants fix multi-grain

ƒ Building blocks: use determinants on leaf data groups

Grouped by
Leaf model generation
objects are (nice to have:
generation determinant
specific filters)

Naming
suffix Uniqueness
1 2 3… based on
composite
CHILD1 is business
top-of-tree keys

Copyright © Boeing 2007. All rights reserved


Framework model: Dimensional construction

ƒ Presentation Layer: connecting the pieces


ƒ Dimensional model construction from Model objects

Hierarchy
name
Build
presentation
layer from Member
BP model levels
building
blocks
Unique leaf
level
Drag drop
& test Set
businesskey
and caption

Copyright © Boeing 2007. All rights reserved


Framework model: Test in Query Studio

ƒ Published package: validate unbalanced structure


First look at
dimensional
Suppress output
first two
layers in final
publish Unbalanced
member
names
All reports promoted to
connect to leaf_level
presentation
layer Leaf
members
connect to
facts
Note: Non-proprietary ‘scrubbed’ test data
Copyright © Boeing 2007. All rights reserved
Framework model: Design challenges met

ƒ Interface to legacy system OLAP data cubes


ƒ Iterative design – not all data structure understood
ƒ ETL expensive and difficult
ƒ Minimize business rules in ETL
ƒ Narrow fact tables - faster than wide
ƒ Link all tables via SID (business keys)
ƒ High volume data (200 Million rows) partitioned
ƒ Users expect 2 - 4 seconds click report response

Copyright © Boeing 2007. All rights reserved


Framework model: Test in Analysis Studio

ƒ Verify to legacy system OLAP data cubes

User Ready to
familiar build
names reports

Is it fast Do
In AS aggregate
10-30 values
secs match

In QS
3-5 Mixed
secs grains

Note: Non-proprietary ‘scrubbed’ test data - all aggregate values are row counts
Copyright © Boeing 2007. All rights reserved
Example 1 of Unbalanced Hierarchy

ƒ Unbalanced Dimensions: promotion of members to leaf level


ƒ Facts link to leaf member level
Measures
dimension

Fringe Dollar
Adjustments
Data
Rollups

Regular
Mixed- Dollars
grain data

Link by
Root_child

Note: Non-proprietary ‘scrubbed’ test data


Copyright © Boeing 2007. All rights reserved
Example 2 of Unbalanced Hierarchy - SHARED

ƒ Unbalanced Dimensions: complex ‘network’ members


‘Cloned’
ƒ ‘SHARED’ dimension members have root_child
parents and
child data

‘Cloned’
parent

‘Cloned’ child
data from
root_child

Attached to
different
ancestor

Note: Non-proprietary ‘scrubbed’ test data


Copyright © Boeing 2007. All rights reserved
Design strategy: Model meets the needs

ƒ Who: model end-user vs. reports end-user


ƒ Adapt to Teams, Roles and Org maturity
Three layer Priorities may
design - change
only two
Developer Key success
model not drivers
end-user
Compromise
3NF and validate
structure
Rely on
principals
Denormalize
in rdbms

Copyright © Boeing 2007. All rights reserved


Best practices: Measures for success – check!

ƒ So how’d we do? Success criteria / performance indicators


ƒ First release due: July 2006,
Delivered first reports: March 2007
ƒ Followed process: DevÆTestÆProd, docs
ƒ Tech reviews: hold daily status with PMs
ƒ Customer and End-user acceptance: improved their data quality
Really appreciate common business model and Cognos rpts
ƒ Cost and schedules: re-planned to meet realities
ƒ Performance: designed-in, mat views added, DBA involved
ƒ Support and operations: OJT, handover challenges,
teaming improvements, working together, find-a-way
ƒ Users: want more BI reports and faster deployments

Copyright © Boeing 2007. All rights reserved


Evaluation Forms

ƒ Each completed evaluation qualifies you to


win one of five $100 American Express gift certificates
given away daily.
ƒ Complete evaluations for every session you attend
and qualify to win an additional $500! An overall conference
survey will be available at Cognos Central on Thursday morning,
and will also be emailed to you. Complete the survey by May 25,
2007, and you'll qualify to win $500!

Copyright © Boeing 2007. All rights reserved

S-ar putea să vă placă și