Vous êtes sur la page 1sur 10

6/1/2015

TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI

GreatBIWithOracleBI
OracleBI(OBIEE)BestPracticesbyJeffMcQuigg

TheSingleMostImportantThingtoKnowAbouttheOBIRPD
SEP10
PostedbyJeffMcQuigg
OvermyOBIcareerIvehadtoreviewdozensofcustomerandconsultantdevelopedRPDsaspartofeitheraformalizedhealth
checkengagementorsimplyadevelopercodereview.Frequentlythecustomerhassomeproblemsthattheycantsolve,orthat
theyhavesolvedwithaworkaroundofsomesorts.Insomecasesthisissimplyduetonotfullyunderstandingtheconceptsand
whatyoucandowiththoseconcepts,butsometimesthereissomethingfarworseatplay:badadvicefromsupposedexperts.
TwicethisyearIhavecomeacrosscustomerswhohavebeentoldbyotherexpertsthatDimensionalHierarchiesarentthat
importantortheyshouldleavetheContenttabempty.OneofthesesocalledexpertswasevenanactualOracleemployee!This
isdisastrousadviceasIwilldemonstrateinthispost.
Luckilyfollowingafewsimplepracticeswillensureyouareingoodshapeanddontenduppaintingyourselfinacorner.Along
thewayyouwillbegintounderstandhowtheBIServeractuallythinks.Onceyouareabletolearnhowtopredictwhatitwill
dowith100%certainty,youcancontrolittodowhatyouwantittodoanddiagnosethesolutionswhenitdoesnt.
DimensionalHierarchiesinOBIEEareusedforavarietyofimportantfeaturesintheRPD,manyofwhichyoumaynotknow
about.Thispostwillexplorethefundamentalreasonfortheirexistenceandsomespecializedfeaturesthatrequiretheir
existence.ButmostlywelldiscussthesinglemostimportantthingtoknowabouttheRPD.
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/

1/10

6/1/2015

TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI

HierarchiesNotjustforDrillDown
Weallknowthatusersdrilldownalongdimensionalhierarchies,butwhatdoestheOBIBIServerusethemfor?WhenIaskthis
question,Itendtogetalotofsilenceontheendofthephoneduringinterviews.Itisimportanttounderstandwhyweneed
DimensionalHierarchiesinthefirstplace.Mygoalhereistoputtobedanyonewhosaystheyarenotneededoroptional.Ill
leavethemostimportantreasonforlastasitseguesintoalargerdiscussion.
1.LevelBasedMetrics
ALevelBasedMetric(LBM)isaregularmetricthathasbeenpinnedtoafixedlevelinahierarchy.Thesimplestexampleofthis
isaMonthlyvalue,suchasMonthlyRevenue$.Inthisscenario,theregularRevenue$metricisfreetooperateatwhateverlevels
areneededbythequery,whetheritisthebasicgrainofthereport,asubtotalorgrandtotal,freetooperatewithdrilldownsand
drillacrosses.
TheMonthlyversionhoweverisforcingthemetrictobepinnedtotheMonthleveloftheDatehierarchy.Ineffect,itisforcinga
GROUPBYMONTHinallcases.WhenyouhaveDaylevelonthereportalongwithRevenue$andMonthlyRevenue$,youcan
expecttheMonthlyRevenuevaluetoberepeatedforalldaysineachmonth.Behindthescenesthiswillbeeither2queriesorone
querywithanAGGREGATEfunctioninit.

https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/

2/10

6/1/2015

TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI

(https://greatobi.files.wordpress.com/2013/09/lbm1.png)
ThisforcingofGROUPBYMONTHoccursintheflipscenarioaswellwhenthegrainonthereportishigherthanthatofthe
LBM,itwillstillissuethatGROUPBYMONTHregardlessofthegrainofyourreport,resultinginbreakoutsandrowsyoumight
nothaveexpected:

https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/

3/10

6/1/2015

TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI

(https://greatobi.files.wordpress.com/2013/09/lbm2.png)
2.LevelBasedMetricsforNonConformedDimensions(NCDs)
ThistopicisoneofthemorecommonquestionsIseeonthediscussionforumsandwithcustomers.ThewayOBIworksmakesit
moredifficultthanitneedstobetomakeaNCDworkproperlywithotherfacts.However,thesolutiontomakingtheseNCDs
workinvolvessettingthecontenttabforeachmetrictotheTotalslevel.Effectively,youaresayingthatthemetricisattheAllor
Totallevelofthatdimension,whichalsomeanstheNonelevel.Thispartgetsconceptuallytricky,buttosimplifyitjustthink:
whenitsattheTotallevelforadimension,anyfilterorreferencetothatdimensionforthismetricwillbeignored.Thus,agroup
byorafilteronaNCDwhenusedwithametricattheTotalslevelwillbeignoredcompletely.
Example:
SupposeyouwantedtoseeCustomer,#SRsandOrder$amountsonasinglereport,butyouwantedtofilterdowntheSRsbased
onSRstatusofOpen.SinceSRStatusdimensiondoesnotworkwithOrderamountfacts,OBIwillnotbeabletoanswerthe
question:Order$byCustomerandSRStatus.SettingtheOrder$MetrictothetotalslevelfortheSRStatusdimensionwill
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/

4/10

6/1/2015

TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI

forceOBItoignorethatrelationshipcompletely,therebyconvertingitinto:Order$byCustomerUNION/STITCHJOIN#SRs
byCustomerwhereSRStatus=Open
Thistopicalonemightservewelltohaveitsownpost.However,Ihavewrittenthisupinapresentation
(https://greatobi.files.wordpress.com/2011/06/mcquigg_advancedmetadatatopics.pdf)here,onpages1016
Note:SettingthetotalslevelontheContenttaboftheLTSismeaninglessandisidenticaltoleavingitblank.Ihaveseensome
developersbeincorrectaboutthis.
3.TimeSeries
Movingontoamorestraightforwardexample,youcannotusethetimeseriesfunctionswithoutestablishingaTimeHierarchy
withappropriatelevels.
4.NestedAggregation
Nestedaggregationiswhereyoucanhavea2+stepaggregationsequence.Forexample,youmayneedaSum(Last(metric))ifyou
arecomputingtotalmonthendheadcountusingdailysnapshottables.However,youneedtobeabitmoredescriptivewhenyou
tellOBIthesequenceyouneedtotellitwhatdimensionsyouwanttoapplyLast()toandwhattoapplySum()tootherwiseit
hasnoidea.Thus,youractualnestedaggregationruleshouldbemorelike:Sum(Last(metric)byDate.Month)).Formoredetails,
pleasecheckoutamorecomprehensivearticlehere(https://greatobi.wordpress.com/2013/03/21/obisnestedaggregationralph
kimball/).
TheContentTab
Beforemovingontothenextfewitems,IneedtointroduceyoutotheContentTaboneachLogicalTableSource(LTS).Thistabis
withoutanyquestionthemostimportantportionofOBIRPDmodeling.Unfortunatelyitisalsotheonethatismostcomplicatedto
master.AsaresultitisalsotheonethatisthemostincorrectandresultsinmoreRPDerrorsandproblemsthananythingelse.In
myexperienceithasbeenandstillisthe#1causeofbrokenrepositories.
Whatissoimportantaboutthecontenttab?ThetopportioniswherethegrainofeachLTSisfullydescribedtoOBI.OBIuses
thisinformationwhenpickingLTSs,bothdimensionsandfacts.ItiswhatisusedtoidentifywhatLTSisahighersource(or
aggregatesource)vs.another.ThejoinstootherLTSs(acrossdim&facts)aretheskeletonoftheOBIRPDandisfundamentalto
howitoperatesandtheSQLitgenerates.ItishowitknowsthatSRStatuscanbeusedwiththeSRFactsLTSbutnotwiththe
OrdersFactsLTS.ItishowitknowsthataMonthlytableisbetterthanadailytable,andwhenitcanusethemonthlysourceand
whenitcannot.
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/

5/10

6/1/2015

TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI

Withoutthecontenttabproperlyfilledout,therulesofhowOBIselectsaLTSbecomeabitmuddled.FranklyIcannottellyou
howitdoeswhatitdoeswithoutthem;theonlyoneswhoprobablycanaresomeoftheoriginalnQuireengineersthattaughtme
theproductmanyyearsago.Ihavealsoavoidedevenbotheringwithitbyalwayscompletelyandproperlyfillingitoutasthe
firststepindiagnosingproblemsgetthefoundationsolidfirstthenworryabouttheremainingproblems.
Withoutthecontenttabproperlyfilledout,manyoftheotherfeaturesofOBIdonotworkproperly.Icameacrossaperfect
exampleofthisjustlastweek.ThecustomerhadfollowedtheapproachaboveonusingthetotalsleveltodealwithNon
rd
rd
ConformedDimensions.Itwasworkingfinewhentheyhad2facttablesand2NCDs.Butwhentheyaddeda3 factand3
NCD,itstoppedworkingcompletely.Thereason?TheContenttabswerenotfilledinatall.Thus,OBIdidnothaveenough
informationonhowtosolvetheproblem.SettingupthecontenttabsonthefactsanddimensionalLTSsolvedtheproblem
perfectlyonthefirsttry.
LetmereiteratehowimportantContentTabsare:WhenIdoaRPDreview,thefirstthingIlookataretheContenttabs.Ifthey
aremissingorincomplete,allbetsareoff;Icannotsolveanyproblemsuntiltheyareproperlyandcompletelyfilledout.Once
thatisdone,itisquitecommonfortheproblemtobecorrectedwithoutfurthereffort,butifnotatleasttheBIServerhastheright
informationandwehavethelanguageandunderstandingtoworkwiththeRPDtodowhatitshouldbedoing.
Forthosewhostilldontbelieveme,takealookatOraclesownBIAppsRPDallofthecontenttabsareproperlyfilledout.The
engineersthoughtitwasimportanttodosososhouldyou.
Properuseofcontenttabsallowsustodoafewmoreveryimportantfunctions:
5.GrainLeveling
Thisiswhereyouwanttomixtwofacttablegrainsonthesamereport.Forexample,youdliketoshowamonthlyreportwith
actualsfromtheDaytableandBudgetsfromthemonthtable.AsOBIknowsthatbothlinkintotheDatedimension,itwillissue
theappropriatequeryforeachsource.Inthisexample,itknowshowtorollupDaytoMonthandthenequalizeitwithMonthly
budgets.
6.AggregateNavigation
AggregateNavigationisafundamentalcapabilityoftheproduct.IdinfactsayAggregateNavigationisasubsetofjustgeneral
LTSSelectiontheprocessbywhichOBIselectsaLTStouse.ThecontenttabtellsOBIthataLTSattheMonthlevelisabetter
sourcethananLTSattheDaylevel.IttellsusthatwecannotusetheLTSwithouttheProductDimensionwhenwehaveProduct
onthereportOBIhastochooseadifferentoneifavailable.
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/

6/10

6/1/2015

TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI

7.VerticalFederation
VerticalFederationconceptuallyisverysimple:putyouraggregatetableinadifferentdatabase.Thatsallitis.Thus,youcan
haveanaggregateattheMonthlevelbuiltfromaDailytable.Youcanelecttoputthataggregateinthesamephysicaldatabaseas
theDailytable,oryoucouldthrowitinanEssbasecubeoraTimesTendatabaseasExalyticsdoes.ItdoesntmattertoOBIthat
much;itstillhastowriteaqueryandgettheresultsets.WherethedataliesdoesntmatteratalltoselectingtherightLTS.

DoingitRight
So,howaboutsomethingpracticaltofollowtomakesureyouaresetupcorrectlyfromthebeginning?Followthesethreesimple
rulestoensurethatyoudontpaintyourselfinacornerandbecomestuck.Onsmallersystemsitmayseemlikeoverkill,butthe
pointhereistoa)getintothehabitofdoingitcorrectlyfromthebeginning,b)makesurethatthestuffyoubuildworks,c)be
preparedforwhenyourRPDgrowsmuchlargerpayadollarnowor10later.
Ifyouhaventbeenfollowingthem,Istronglyurgeyoutostopeverythingandspenddevelopmentandregressiontestcyclesto
properlyandfullysetupyourcontenttabs.Youmayfindthatitisabitpainfultoaddthesein,asyouwillstarttogetalotof
RPDwarningsonConsistencyCheck,butfightthroughthemandcleanthemallup.Youmaystarttonoticethatsomeofyour
problemsdisappear.
ForeveryLogicalDimensiontable,alwaysmakeaHierarchy,evenifitisjustTotals&Details.Thisonlytakesalittlebitof
effort,andsetsyouupforalloftheitemsdiscussedinthisarticle.
AlwaysfullyandcompletelyfillintheContenttabforeverysingleLTS,bothFactandDimension.Thetwowillultimately
needtopointtoeachother.Iftheydonot,youllgetaRPDwarning.Dothisallofthetime,nomatterifyouhaveonly3
tablesinyourRPD.DoingsoenablesthemorepowerfulfeaturesofOBI,butalsomakesjustaboutanythingworkmore
properlyinmorescenarios.
DontlietoOBIaboutgrainsorHierarchystructure.Ifyoumissoneoraddanextra,ifyouassignthewronggrain,OBIwill
makeyoupayforitwithaverydifficulttodiagnoseproblem.IfarelationshipbetweentwofieldsisM:M,donotmodelthem
asa1:Mparent:childOBIwillbiteyouatsomepoint.GothroughtheefforttogiveOBItherightinformationtomakethe
rightdecision.

7/10
ThealternativeofcourseistohaveRPDproblemsandtakemuchlongertosolvenewonesandgetfrustratedwiththeproductin

https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/

6/1/2015

TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI

ThealternativeofcourseistohaveRPDproblemsandtakemuchlongertosolvenewonesandgetfrustratedwiththeproductin
general.InmyyearsofworkingwithOBI,theRPDisveryreliableitgeneratestherightSQL.Ifitisnotgeneratingitcorrectly,
itisnearlyalways(99.99%)thearchitectsfaultfornottellingOBItherightdetailseitherthroughomissionourincorrectly.
About these ads
(http://wordpress.com/about-

PostedonSeptember10,2013,inBITheoryandBestPractices,OBIEEDevelopment,RepositoryandtaggedContentTab,
dimensions,Hierachies,Hierarchy,LevelBasedMetrics,Levels,NonConformedDimensions,OBIEE.Bookmarkthepermalink.7
Comments.

Leaveacomment

Trackbacks2

Comments5
obi|September11,2013at2:47pm
Niceone
DougRoss|September14,2013at9:05pm
Goodexplanation.
VenkatG|September28,2013at5:37pm
HiJeff,
ThanksalotforsharingsuchgreatRpdmodelingtechniquesthatveryfewpeoplereallyunderstandsandfindstimetoshare
knowledgewithOracleBIcommunity.iwishyouwouldfindtimetowriteafullbookonthistopicOracleBIMetaData
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/

8/10

6/1/2015

TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI

ModelingCompleteReferencePracticalApproachforRequirementsModeling
IhopewewillseemanymoresuchmodelingtechniquesandprojectimplementationmethodologiesforOBIAProjectson
yourblog
CongratsforyourrecentOracleprojectexcellenceawardforHRAnalyticsproject,
VenkatG
rmoff|October30,2014at5:25am
Jeffgreatarticle.AnycommentsontheCheckLevels/GetLevelsfunctionintheAdminToolwhendefininganLTS
content?Itfrequentlysuggestsblanksfordimsagainstafacttable,whichrunscontrarytoyouradviceAlwaysfullyand
completelyfillintheContenttabforeverysingleLTS,bothFactandDimension.
thanks,Robin.
JeffMcQuigg|October30,2014at7:54am
HeyRobin,
Ifitleavesthemblankitsbecauseitdoesntworkproperly,notbecauseitthinksitsoktoleavethemblank.
IdonttrustmanyoftheautomatedpiecesofwhattheAdmintooldoes,insteadpreferringtheapproachofthedeveloper
knowingexactlywhatshouldbedoneandthendoingit.Samethinggoesforwhenyouimportphysicaltablesyounever
importFKs.Dothemyourselfsoyouknowexactlywhatishappening.IdontlikeunintendedconsequencesintheRPD
duetoinaccurateoroverlyaggressivecode.
Iwasusingitjustyesterdayanditgotafewthingswrong.Sono,Idrecommendnotusingitunless(likeIwas)youarein
abrandnewRPDyouveneverseenanditcanpointyouintherightdirectionwithdimensionsyouareunfamiliarwith.
JeffM.
1. Pingback:BlogoftheWeek|Addidici13YearsOBIEEandOBIApplications
2. Pingback:NationalJeffDay|Addidici14YearsOBIEEandOBIApplications

BlogatWordPress.com.TheMystiqueTheme.
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/

9/10

6/1/2015

TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI

Follow

FollowGreatBIWithOracleBI
BuildawebsitewithWordPress.com

https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/

10/10

Vous aimerez peut-être aussi