Upload
robot1984
View
214
Download
0
Embed Size (px)
DESCRIPTION
The Single Most Important Thing to Know About the OBI RPD _ Great BI With Oracle BI
Citation preview
6/1/2015 TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/ 1/10
PostedbyJeffMcQuigg
GreatBIWithOracleBI
OracleBI(OBIEE)BestPracticesbyJeffMcQuigg
TheSingleMostImportantThingtoKnowAbouttheOBIRPD
SEP10
OvermyOBIcareerIvehadtoreviewdozensofcustomerandconsultantdevelopedRPDsaspartofeitheraformalizedhealthcheckengagementorsimplyadevelopercodereview.Frequentlythecustomerhassomeproblemsthattheycantsolve,orthattheyhavesolvedwithaworkaroundofsomesorts.Insomecasesthisissimplyduetonotfullyunderstandingtheconceptsandwhatyoucandowiththoseconcepts,butsometimesthereissomethingfarworseatplay:badadvicefromsupposedexperts.
TwicethisyearIhavecomeacrosscustomerswhohavebeentoldbyotherexpertsthatDimensionalHierarchiesarentthatimportantortheyshouldleavetheContenttabempty.OneofthesesocalledexpertswasevenanactualOracleemployee!ThisisdisastrousadviceasIwilldemonstrateinthispost.
Luckilyfollowingafewsimplepracticeswillensureyouareingoodshapeanddontenduppaintingyourselfinacorner.AlongthewayyouwillbegintounderstandhowtheBIServeractuallythinks.Onceyouareabletolearnhowtopredictwhatitwilldowith100%certainty,youcancontrolittodowhatyouwantittodoanddiagnosethesolutionswhenitdoesnt.
DimensionalHierarchiesinOBIEEareusedforavarietyofimportantfeaturesintheRPD,manyofwhichyoumaynotknowabout.Thispostwillexplorethefundamentalreasonfortheirexistenceandsomespecializedfeaturesthatrequiretheirexistence.ButmostlywelldiscussthesinglemostimportantthingtoknowabouttheRPD.
6/1/2015 TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/ 2/10
HierarchiesNotjustforDrillDown
Weallknowthatusersdrilldownalongdimensionalhierarchies,butwhatdoestheOBIBIServerusethemfor?WhenIaskthisquestion,Itendtogetalotofsilenceontheendofthephoneduringinterviews.ItisimportanttounderstandwhyweneedDimensionalHierarchiesinthefirstplace.Mygoalhereistoputtobedanyonewhosaystheyarenotneededoroptional.Illleavethemostimportantreasonforlastasitseguesintoalargerdiscussion.
1.LevelBasedMetrics
ALevelBasedMetric(LBM)isaregularmetricthathasbeenpinnedtoafixedlevelinahierarchy.ThesimplestexampleofthisisaMonthlyvalue,suchasMonthlyRevenue$.Inthisscenario,theregularRevenue$metricisfreetooperateatwhateverlevelsareneededbythequery,whetheritisthebasicgrainofthereport,asubtotalorgrandtotal,freetooperatewithdrilldownsanddrillacrosses.
TheMonthlyversionhoweverisforcingthemetrictobepinnedtotheMonthleveloftheDatehierarchy.Ineffect,itisforcingaGROUPBYMONTHinallcases.WhenyouhaveDaylevelonthereportalongwithRevenue$andMonthlyRevenue$,youcanexpecttheMonthlyRevenuevaluetoberepeatedforalldaysineachmonth.Behindthescenesthiswillbeeither2queriesoronequerywithanAGGREGATEfunctioninit.
6/1/2015 TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/ 3/10
(https://greatobi.files.wordpress.com/2013/09/lbm1.png)
ThisforcingofGROUPBYMONTHoccursintheflipscenarioaswellwhenthegrainonthereportishigherthanthatoftheLBM,itwillstillissuethatGROUPBYMONTHregardlessofthegrainofyourreport,resultinginbreakoutsandrowsyoumightnothaveexpected:
6/1/2015 TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/ 4/10
(https://greatobi.files.wordpress.com/2013/09/lbm2.png)
2.LevelBasedMetricsforNonConformedDimensions(NCDs)
ThistopicisoneofthemorecommonquestionsIseeonthediscussionforumsandwithcustomers.ThewayOBIworksmakesitmoredifficultthanitneedstobetomakeaNCDworkproperlywithotherfacts.However,thesolutiontomakingtheseNCDsworkinvolvessettingthecontenttabforeachmetrictotheTotalslevel.Effectively,youaresayingthatthemetricisattheAllorTotallevelofthatdimension,whichalsomeanstheNonelevel.Thispartgetsconceptuallytricky,buttosimplifyitjustthink:whenitsattheTotallevelforadimension,anyfilterorreferencetothatdimensionforthismetricwillbeignored.Thus,agroupbyorafilteronaNCDwhenusedwithametricattheTotalslevelwillbeignoredcompletely.
Example:
SupposeyouwantedtoseeCustomer,#SRsandOrder$amountsonasinglereport,butyouwantedtofilterdowntheSRsbasedonSRstatusofOpen.SinceSRStatusdimensiondoesnotworkwithOrderamountfacts,OBIwillnotbeabletoanswerthequestion:Order$byCustomerandSRStatus.SettingtheOrder$MetrictothetotalslevelfortheSRStatusdimensionwill
6/1/2015 TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/ 5/10
forceOBItoignorethatrelationshipcompletely,therebyconvertingitinto:Order$byCustomerUNION/STITCHJOIN#SRsbyCustomerwhereSRStatus=Open
Thistopicalonemightservewelltohaveitsownpost.However,Ihavewrittenthisupinapresentation(https://greatobi.files.wordpress.com/2011/06/mcquigg_advancedmetadatatopics.pdf)here,onpages1016
Note:SettingthetotalslevelontheContenttaboftheLTSismeaninglessandisidenticaltoleavingitblank.Ihaveseensomedevelopersbeincorrectaboutthis.
3.TimeSeries
Movingontoamorestraightforwardexample,youcannotusethetimeseriesfunctionswithoutestablishingaTimeHierarchywithappropriatelevels.
4.NestedAggregation
Nestedaggregationiswhereyoucanhavea2+stepaggregationsequence.Forexample,youmayneedaSum(Last(metric))ifyouarecomputingtotalmonthendheadcountusingdailysnapshottables.However,youneedtobeabitmoredescriptivewhenyoutellOBIthesequenceyouneedtotellitwhatdimensionsyouwanttoapplyLast()toandwhattoapplySum()tootherwiseithasnoidea.Thus,youractualnestedaggregationruleshouldbemorelike:Sum(Last(metric)byDate.Month)).Formoredetails,pleasecheckoutamorecomprehensivearticlehere(https://greatobi.wordpress.com/2013/03/21/obisnestedaggregationralphkimball/).
TheContentTab
Beforemovingontothenextfewitems,IneedtointroduceyoutotheContentTaboneachLogicalTableSource(LTS).ThistabiswithoutanyquestionthemostimportantportionofOBIRPDmodeling.Unfortunatelyitisalsotheonethatismostcomplicatedtomaster.AsaresultitisalsotheonethatisthemostincorrectandresultsinmoreRPDerrorsandproblemsthananythingelse.Inmyexperienceithasbeenandstillisthe#1causeofbrokenrepositories.
Whatissoimportantaboutthecontenttab?ThetopportioniswherethegrainofeachLTSisfullydescribedtoOBI.OBIusesthisinformationwhenpickingLTSs,bothdimensionsandfacts.ItiswhatisusedtoidentifywhatLTSisahighersource(oraggregatesource)vs.another.ThejoinstootherLTSs(acrossdim&facts)aretheskeletonoftheOBIRPDandisfundamentaltohowitoperatesandtheSQLitgenerates.ItishowitknowsthatSRStatuscanbeusedwiththeSRFactsLTSbutnotwiththeOrdersFactsLTS.ItishowitknowsthataMonthlytableisbetterthanadailytable,andwhenitcanusethemonthlysourceandwhenitcannot.
6/1/2015 TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/ 6/10
Withoutthecontenttabproperlyfilledout,therulesofhowOBIselectsaLTSbecomeabitmuddled.FranklyIcannottellyouhowitdoeswhatitdoeswithoutthem;theonlyoneswhoprobablycanaresomeoftheoriginalnQuireengineersthattaughtmetheproductmanyyearsago.Ihavealsoavoidedevenbotheringwithitbyalwayscompletelyandproperlyfillingitoutasthefirststepindiagnosingproblemsgetthefoundationsolidfirstthenworryabouttheremainingproblems.
Withoutthecontenttabproperlyfilledout,manyoftheotherfeaturesofOBIdonotworkproperly.Icameacrossaperfectexampleofthisjustlastweek.ThecustomerhadfollowedtheapproachaboveonusingthetotalsleveltodealwithNonConformedDimensions.Itwasworkingfinewhentheyhad2facttablesand2NCDs.Butwhentheyaddeda3 factand3NCD,itstoppedworkingcompletely.Thereason?TheContenttabswerenotfilledinatall.Thus,OBIdidnothaveenoughinformationonhowtosolvetheproblem.SettingupthecontenttabsonthefactsanddimensionalLTSsolvedtheproblemperfectlyonthefirsttry.
LetmereiteratehowimportantContentTabsare:WhenIdoaRPDreview,thefirstthingIlookataretheContenttabs.Iftheyaremissingorincomplete,allbetsareoff;Icannotsolveanyproblemsuntiltheyareproperlyandcompletelyfilledout.Oncethatisdone,itisquitecommonfortheproblemtobecorrectedwithoutfurthereffort,butifnotatleasttheBIServerhastherightinformationandwehavethelanguageandunderstandingtoworkwiththeRPDtodowhatitshouldbedoing.
Forthosewhostilldontbelieveme,takealookatOraclesownBIAppsRPDallofthecontenttabsareproperlyfilledout.Theengineersthoughtitwasimportanttodosososhouldyou.
Properuseofcontenttabsallowsustodoafewmoreveryimportantfunctions:
5.GrainLeveling
Thisiswhereyouwanttomixtwofacttablegrainsonthesamereport.Forexample,youdliketoshowamonthlyreportwithactualsfromtheDaytableandBudgetsfromthemonthtable.AsOBIknowsthatbothlinkintotheDatedimension,itwillissuetheappropriatequeryforeachsource.Inthisexample,itknowshowtorollupDaytoMonthandthenequalizeitwithMonthlybudgets.
6.AggregateNavigation
AggregateNavigationisafundamentalcapabilityoftheproduct.IdinfactsayAggregateNavigationisasubsetofjustgeneralLTSSelectiontheprocessbywhichOBIselectsaLTStouse.ThecontenttabtellsOBIthataLTSattheMonthlevelisabettersourcethananLTSattheDaylevel.IttellsusthatwecannotusetheLTSwithouttheProductDimensionwhenwehaveProductonthereportOBIhastochooseadifferentoneifavailable.
rd rd
6/1/2015 TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/ 7/10
7.VerticalFederation
VerticalFederationconceptuallyisverysimple:putyouraggregatetableinadifferentdatabase.Thatsallitis.Thus,youcanhaveanaggregateattheMonthlevelbuiltfromaDailytable.YoucanelecttoputthataggregateinthesamephysicaldatabaseastheDailytable,oryoucouldthrowitinanEssbasecubeoraTimesTendatabaseasExalyticsdoes.ItdoesntmattertoOBIthatmuch;itstillhastowriteaqueryandgettheresultsets.WherethedataliesdoesntmatteratalltoselectingtherightLTS.
DoingitRight
So,howaboutsomethingpracticaltofollowtomakesureyouaresetupcorrectlyfromthebeginning?Followthesethreesimplerulestoensurethatyoudontpaintyourselfinacornerandbecomestuck.Onsmallersystemsitmayseemlikeoverkill,butthepointhereistoa)getintothehabitofdoingitcorrectlyfromthebeginning,b)makesurethatthestuffyoubuildworks,c)bepreparedforwhenyourRPDgrowsmuchlargerpayadollarnowor10later.
Ifyouhaventbeenfollowingthem,Istronglyurgeyoutostopeverythingandspenddevelopmentandregressiontestcyclestoproperlyandfullysetupyourcontenttabs.Youmayfindthatitisabitpainfultoaddthesein,asyouwillstarttogetalotofRPDwarningsonConsistencyCheck,butfightthroughthemandcleanthemallup.Youmaystarttonoticethatsomeofyourproblemsdisappear.
ForeveryLogicalDimensiontable,alwaysmakeaHierarchy,evenifitisjustTotals&Details.Thisonlytakesalittlebitofeffort,andsetsyouupforalloftheitemsdiscussedinthisarticle.AlwaysfullyandcompletelyfillintheContenttabforeverysingleLTS,bothFactandDimension.Thetwowillultimatelyneedtopointtoeachother.Iftheydonot,youllgetaRPDwarning.Dothisallofthetime,nomatterifyouhaveonly3tablesinyourRPD.DoingsoenablesthemorepowerfulfeaturesofOBI,butalsomakesjustaboutanythingworkmoreproperlyinmorescenarios.DontlietoOBIaboutgrainsorHierarchystructure.Ifyoumissoneoraddanextra,ifyouassignthewronggrain,OBIwillmakeyoupayforitwithaverydifficulttodiagnoseproblem.IfarelationshipbetweentwofieldsisM:M,donotmodelthemasa1:Mparent:childOBIwillbiteyouatsomepoint.GothroughtheefforttogiveOBItherightinformationtomaketherightdecision.
ThealternativeofcourseistohaveRPDproblemsandtakemuchlongertosolvenewonesandgetfrustratedwiththeproductin
6/1/2015 TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/ 8/10
ThealternativeofcourseistohaveRPDproblemsandtakemuchlongertosolvenewonesandgetfrustratedwiththeproductingeneral.InmyyearsofworkingwithOBI,theRPDisveryreliableitgeneratestherightSQL.Ifitisnotgeneratingitcorrectly,itisnearlyalways(99.99%)thearchitectsfaultfornottellingOBItherightdetailseitherthroughomissionourincorrectly.
PostedonSeptember10,2013,inBITheoryandBestPractices,OBIEEDevelopment,RepositoryandtaggedContentTab,dimensions,Hierachies,Hierarchy,LevelBasedMetrics,Levels,NonConformedDimensions,OBIEE.Bookmarkthepermalink.7Comments.
Leaveacomment
Trackbacks2
Comments5
obi|September11,2013at2:47pmNiceone
DougRoss|September14,2013at9:05pmGoodexplanation.
VenkatG|September28,2013at5:37pmHiJeff,ThanksalotforsharingsuchgreatRpdmodelingtechniquesthatveryfewpeoplereallyunderstandsandfindstimetoshareknowledgewithOracleBIcommunity.iwishyouwouldfindtimetowriteafullbookonthistopicOracleBIMetaData
About these ads(http://wordpress.com/about-
6/1/2015 TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/ 9/10
ModelingCompleteReferencePracticalApproachforRequirementsModeling
IhopewewillseemanymoresuchmodelingtechniquesandprojectimplementationmethodologiesforOBIAProjectsonyourblog
CongratsforyourrecentOracleprojectexcellenceawardforHRAnalyticsproject,
VenkatG
rmoff|October30,2014at5:25amJeffgreatarticle.AnycommentsontheCheckLevels/GetLevelsfunctionintheAdminToolwhendefininganLTScontent?Itfrequentlysuggestsblanksfordimsagainstafacttable,whichrunscontrarytoyouradviceAlwaysfullyandcompletelyfillintheContenttabforeverysingleLTS,bothFactandDimension.
thanks,Robin.
JeffMcQuigg|October30,2014at7:54amHeyRobin,
Ifitleavesthemblankitsbecauseitdoesntworkproperly,notbecauseitthinksitsoktoleavethemblank.IdonttrustmanyoftheautomatedpiecesofwhattheAdmintooldoes,insteadpreferringtheapproachofthedeveloperknowingexactlywhatshouldbedoneandthendoingit.SamethinggoesforwhenyouimportphysicaltablesyouneverimportFKs.Dothemyourselfsoyouknowexactlywhatishappening.IdontlikeunintendedconsequencesintheRPDduetoinaccurateoroverlyaggressivecode.
Iwasusingitjustyesterdayanditgotafewthingswrong.Sono,Idrecommendnotusingitunless(likeIwas)youareinabrandnewRPDyouveneverseenanditcanpointyouintherightdirectionwithdimensionsyouareunfamiliarwith.
JeffM.
1. Pingback:BlogoftheWeek|Addidici13YearsOBIEEandOBIApplications
2. Pingback:NationalJeffDay|Addidici14YearsOBIEEandOBIApplications
BlogatWordPress.com.TheMystiqueTheme.
6/1/2015 TheSingleMostImportantThingtoKnowAbouttheOBIRPD|GreatBIWithOracleBI
https://greatobi.wordpress.com/2013/09/10/thesinglemostimportantthingtoknowabouttheobirpd/ 10/10
Follow
FollowGreatBIWithOracleBI
BuildawebsitewithWordPress.com