10
Posted by Jeff McQuigg G reat BI With Oracle BI O racle BI (OBIEE) Best Practices by Jeff McQuigg The Single Most Important Thing to Know About the OBI RPD SEP 10 Over my OBI career I’ve had to review dozens of customer and consultant developed RPDs as part of either a formalized health check engagement or simply a developer code review. Frequently the customer has some problems that they can’t solve, or that they have solved with a work‑around of some sorts. In some cases this is simply due to not fully understanding the concepts and what you can do with those concepts, but sometimes there is something far worse at play: bad advice from supposed experts. Twice this year I have come across customers who have been told by other “experts” that Dimensional Hierarchies aren’t that important or they should leave the Content tab empty. One of these so called experts was even an actual Oracle employee! This is disastrous advice as I will demonstrate in this post. Luckily following a few simple practices will ensure you are in good shape and don’t end up painting yourself in a corner. Along the way you will begin to understand how the BI Server actually “thinks”. Once you are able to learn how to predict what it will do with 100% certainty, you can control it to do what you want it to do and diagnose the solutions when it doesn’t. Dimensional Hierarchies in OBIEE are used for a variety of important features in the RPD, many of which you may not know about. This post will explore the fundamental reason for their existence and some specialized features that require their existence. But mostly we’ll discuss the single most important thing to know about the RPD.

The Single Most Important Thing to Know About the OBI RPD _ Great BI With Oracle BI

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