This post I thought of covering end to end creating a sample RPD, Changing the settings
in EM and querying it from answers in !IEE ""g# It covers following topics
This will $e a good starting point for someone who wants to learn !IEE""g# "# !uilding Physical %ayer &# !uiding !MM layer '# !uilding Presentation %ayer (# )pdating the settings in EM for latest RPD *# +tarting !I services ,# Ena$ling -uery %ogging Building Physical Layer Understanding the Business Scenario & Data structure Business Scenario: +ales history schema comes with racle data$ase as one of the sample schemas# It e.plains a $usiness scenario where company has products which are sold through multiple channels to customers with seasoned promotions to ma/e the sales effective# Steps to Install the Schema: +cripts can $e found under the path $ORACLE_HOME/demo/schema/sales_history %ogin to the racle Data$ase with system user# Run the main script sh_main.sql which will create the whole schema# It will create the user +0 and $elow list of ta$les# Tale !ame C)1TRIE+ C)+TMER+ PRD)CT+ TIME+ PRMTI1+ C0211E%+ +2%E+ C+T+ Importing a Data Source "# Create a 1ew Repository for D3 as mentioned $elow 4 a# +elect +tart 5 Programs 5 racle !usiness Intelligence 5 !I 2dministration# 6+hortcut 7 +tart 5 Run 5 2dmintool8 $# +elect 9ile 5 1ew c# Enter D" in the 1ame, password in the Repository Password and retype the same# +elect 1o for Import Metadata option# 1ote4 Please note the path where the RPD is getting stored# This is the default location for storing the RPD# &# Import D3 ta$le +chema a# Create a tnsentry in R2C%E:0ME;racle:!I" ;networ/; admin;Tnsnames#ora file for the racle Data$ase from which you are planning to import the data# $# <o $ac/ to 2dmin tool and +elect 9ile 5 Import Metadata Ma/e sure that the connection type is #$%I &'g(&&g)# c# +elect Ta$les = >eys chec/ $o.es 6which ever o$?ect you needed8 2lso at the time of import, you can specify the type of metadata to import# The default is to import ta$les, primary /eys, and foreign /eys# nly import o$?ects needed for query generation# d# Then Clic/ on 1e.t !ote4 +elect the ta$les you wish to import and then clic/ on Import +elected $utton# e# 2fter clic/ing the Import $utton you will see the connection pool which is automatically configured $ased on the options you had selected# @ust clic/ A>B# f# To display the ta$les, e.pand the S* schema data source in the rpd# Cerify that all ta$les imported successfully# g# The 2dmin tool will loo/ li/e this 4 ( )pdate the row count and verify the data$ase connection as shown $elow * +hould $e a$le to see the row counts for each ta$le after the a$ove step# , +ave the repository# a# +elect 9ile 5 +ave# $# Clic/ !o to chec/ <lo$al Consistency# 1ote4 DChec/ <lo$al ConsistencyE chec/s for errors in the entire repository# <enerally these are done to chec/ errors in !usiness Model and Mapping# 9or now you can ignore this# De+ining ,eys and Physical -oins There are two different ways to define /eys in 2dministration tool# The first technique is to create >eys on the ta$le using Ta$le properties and the second technique allows you to create /eys and ?oins using Physical diagram# In the following section we are going to show $oth the techniques# Creating /eys using Ta$le Properties4 %et us start with the Physical ta$le C0211E%+ ta$le# The primary /ey on this ta$le is made up of a single column %*.!!/L_ID# "# In the physical layer, e.pand the D3 folder and select C0211E%+ &# Dou$le clic/ or right clic/ and select properties '# +elect the >eys ta$# (# <ive a name for the Primary >ey# *# +elect the chec/ $o.es for C0211E%:ID# ,# Clic/ > to close the dialog $o.# F# Clic/ > to close the Physical Ta$le window# G# Collapse the C0211E%+ ta$le# H# 1ow you can see the >ey +ign after collapsing the C0211E%+ ta$le# "I# To create a foreign /ey, +elect +2%E+ ta$le ""# Dou$le clic/ or right clic/ and select Properties "&# <o to 9oreign >eys ta$ "'# Clic/ 2dd $utton then select the C0211%E+ ta$le in the first section li/e $elow and select the C0211E%:ID column# "(# Clic/ o/# 1ow 9oreign >ey also created# )sing Physical Diagram 6Recommended84 )sing the Physical Diagram approach you can define $oth Primary and 9oreign /eys in one step# "# In the Physical layer, rightJclic/ the D" data source 5 select Physical Diagram 0 $1ect 2s3 and .ll -oins# &# The physical diagram may appear as in screenshot $elow4 '# $?ects will appear very $ig, $ut the Koom can $e ad?usted# To ad?ust the Koom level, right clic/ on the white space and set the Koom level to "IIL, as shown in screenshot $elow 4 Mou can now drag the ta$les to move around and rearrange them# (# Clic/ the %reate !e4 -oin $utton on the tool$ar# *# Clic/ the PRD)CT+ ta$le first and then on the +2%E+ ta$le# The Physical 9oreign >ey dialog $o. will open up#
,# +elect PRD:ID from PRD)CT+ and PRD:ID from +2%E+# 1ote4 The order of selecting the tables matters while defining the joins. The join has one to many relationship. The first table and the second table has one to many relationship. Generally, there is one to many relationship between Dimensions and Facts. So, we click on dimension first and then on Fact. F# Clic/ $5# If prompted for any question, please select 6es# G# Repeat the a$ove steps to define ?oin $etween all the ta$les# The ?oin conditions are as follows4 P7$8$TI$!S. P7$8$_ID 9 S.L/S. P7$8$_ID TI8/S. TI8/_ID 9 S.L/S. TI8/_ID %UST$8/7S. %UST_ID 9 S.L/S. %UST_ID %*.!!/LS. %*.!!/L_ID 9 S.L/S. %*.!!/L_ID H# 3hen you are finished, clic/ the : in the upper right corner to close the Physical Diagram# "I# +elect ;ile 0 Sa<e or clic/ the Sa<e $utton on the tool$ar to save the repository# ""# Clic/ !o when prompted to chec/ glo$al consistency# "&# %eave the 2dministration Tool and the D3 repository open for the ne.t topic# "'# >eep saving the repository at regular intervals# "(# CongratulationsN Mou have successfully created a new repository, set up an D!C data source, imported a ta$le schema from an e.ternal data source into the Physical layer, and defined /eys and ?oins# In the ne.t topic you learn how to $uild the !usiness Model and Mapping layer of a repository# Building the Business 8odel & 8apping Layer The main purpose of the $usiness model is to capture how users thin/ a$out their $usiness using their own $usiness terms# The $usiness model simplifies the physical schema and maps the usersB $usiness terms to physical sources# There are two main categories of logical ta$les4 ;act and Dimension# %ogical fact ta$les contain the measures of organiKationBs $usiness operations and performance# %ogical dimension ta$les contain the data used to qualify the facts# 2# 9ollow the instructions in case you closed the admin tool or else go to point &# "8 In order to define logical ta$le structure in D3 !usiness Model, you will use racle !I 2dministration tool# a8 +elect Start 5 Programs 5 $racle Business Intelligence 5 BI .dministration# $8 +elect ;ile 5 $pen 5 $++line# c8 Dou$leJclic/ D".rpd to open the repository file# d8 Enter the following parameters4 User4 2dministrator Pass4ord: 2dmin"&' e8 Clic/ $,# &8 Create a !usiness Model $y right clic/ing in the white space in the !usiness Model and Mapping layer and select !e4 Business 8odel# In the name field, name the $usiness model as D" and clic/ ># 2lternatively, you could drag and drop the Physical schema to create the initial !usiness Model# '8 Create logical ta$les $y rightJclic/ing on D3 $usiness model and select !e4 $1ect 0 Logical Tale and name it Sales ;act in the %ogical Ta$le dialog $o. and clic/ $,# (8 Create %ogical column of +ales 9act ta$le a8 In The Physical %ayer e.pand S.L/S ta$le# $8 +elect and drag .8$U!T_S$LD column from the Physical layer to the Sales ;act logical ta$le in the !usiness Model and Mapping layer# 2 new .8$U!T_S$LD logical column is added to the Sales ;act logical ta$le# In the !usiness Model and Mapping layer, dou$leJclic/ .8$U!T_S$LD logical column to open the %ogical Column dialog $o.# c8 <o to the <eneral ta$ and in the 1ame field, rename the column to D2mount +oldE d8 Clic/ the .ggregation ta$# e8 In the De+ault aggregation rule drop down list, select SU8# 2ggregation rule determines the aggregation type to $e used in the +-% query generated $y !I# 9or e.ample, sum, avg, count etc# f8 Clic/ $, to close the %ogical Column dialog $o.# 1otice that the logical column icon is changed to indicate an aggregation rule is applied# g8 Pull the -)21TITM:+%D column from the +2%E+ ta$le to the +ales 9act h8 2dd the aggregation rule as SU8 for -uantity +old logical column# It should appear as li/e $elow *8 Create Dimensions in !usiness Model and Mapping %ayer as follows 4 a8 +elect the following ta$les in the Physical layer# C0211E%+, TIME+, PRD)CT+, C)+TMER+ and PRMTI1+ $8 Drag the selected ta$les from the Physical layer onto the D" $usiness model folder in the !usiness Model and Mapping layer# This automatically creates logical ta$les in the !usiness Model and Mapping layer# c8 RightJclic/ the D" $usiness model and select Business 8odel Diagram 0 "hole Diagram# d8 Place the Sales ;act ta$le in the middle# To ad?ust the Koom factor, right clic/ on the empty space of diagram window and select the Koom# e8 Clic/ the !e4 -oin $utton in the tool$ar# f8 Clic/ on the P7$DU%TS ta$le icon first and then clic/ on Sales ;act ta$le icon in the %ogical Ta$le Diagram# The %ogical @oin dialog $o. opens# %eave the defaults as they are and clic/ ># g8 The ?oin is creating a oneJtoJmany 6"418 relationship that ?oins the /ey column in the first ta$le to a column that is a foreign /ey in the second ta$le# Create the ?oins and repeat the steps for the remaining ta$les# Mou donBt have to specify any ?oin conditions in !usiness ModelO !I server will pic/ the ?oins defined in the Physical %ayer# %*.!!/LS ?oin with Sales ;act %UST$8/7S ?oin with Sales ;act TI8/S ?oin with Sales ;act P7$8$TI$!S ?oin with Sales ;act $serve and close %ogical Ta$le Diagram window# ,8 +elect ;ile 5 Sa<e to save the D" repository F8 Clic/ !$ to chec/ glo$al consistency# G8 Remain logged in to the racle !I 2dministration Tool for the ne.t la$# 7ename Business 8odel Renaming !usiness Model $?ects "8 To change a column name manually, dou$le clic/ a column and change the name# 9or e.ample change AC2%E1D2R ME2RB to ACalendar MearB# &8 To automate column name changing, Clic/ Tools 5 Utilities and from utility dialog $o., clic/ 7ename "i=ard and then E.ecute# '8 In the Rename 3iKard, clic/ the !usiness Model and Mapping ta and select the D" $usiness model# (8 Clic/ the .dd *ierarchy $utton and clic/ !e>t $utton# *8 9irst chec/ $!L6 Logical Tale and Logical %olumn and clic/ !e>t# ,8 +elect .ll te>t lo4ercase and clic/ .dd# F8 Clic/ %hange each occurrence o+ #_) into a space and clic/ .dd# G8 Clic/ ;irst letter capital and clic/ .dd# +imilarly add other rules as per the screenshot# The order of the selected rules is very important, it should appear as shown in ne.t screenshot H8 Clic/ ne>t and clic/ ;inish and verify that logical ta$les and logical columns in the !usiness Model and Mapping layer are renamed as per rules# "I8 The %ogical Ta$le names needs to $e renamed further# It can $e done manually 5 right clic/ the logical ta$le 5 select the 7ename option# ""8 2fter renaming, the logical ta$les it should appear as 4 Deleting )nnecessary !usiness $?ects "8 E.pand %hannels logical ta$le in the !usiness Model and Mapping layer# )se %trl ? clic5 to select the ID columns e.cept Channel ID6we have to retain the primary /ey always8# &8 Press Delete /ey from /ey$oard or RightJclic/ either of the selected columns and select Delete# '8 Clic/ 6es to confirm delete# (8 Cerify that the %hannels logical ta$le now has only three logical columns# *8 Repeat the steps to delete the AIDB logical columns from the following ta$les a8 Customers $8 Products c8 Promotions d8 Times !ote4 If you choose ActrlB $utton to select multiple o$?ect ma/e sure the %ogical Ta$le is not highlighted# ,8 +ave the repository# Do not chec/ glo$al consistency# Building Presentation Layer %reating Presentation Layer o+ D" 7epository />ercise The main purpose of $uilding the Presentation catalog in Presentation %ayer is to provide the useful and necessary data from the endJusers perspective i#e# different view of data for $usiness measures are provide for different type of users# +teps for ma/ing Presentation catalog in Presentation %ayer are as follows4 &3 In case you closed the rpd file, use the following steps to open the repository# a8 +elect Start 5Programs 5 $racle Business Intelligence 5 BI .dministration# $8 +elect ;ile 5 $pen 5 $++line# c8 Dou$leJclic/ D".rpd to open the repository file# d8 Enter the following parameters4 User4 2dministrator Pass4ord: 2dmin"&' e8 Clic/ $,# @3 Cerify that the Presentation layer is visi$le# If it is not visi$le, select Aie4 5 Presentation from the menu $ar. B3 Ma/e the D3 !usiness model availa$le for -ueries# To do so, dou$le clic/ on the D3 $usiness model in the !MM layer 5 select the Chec/$o. for C3 Drag the D" !usiness Model folder from the !usiness Model and Mapping %ayer to the Presentation %ayer# Thus the D" presentation catalog is created in Presentation %ayer# D3 Reordering the columns of D3 presentation catalog# a8 E.pand the D" presentation catalog# $8 Dou$le clic/ the %ustomers ta$le and select the column ta$# c8 Change the order of columns using )p and Down $uttons# +elect the column and then clic/ on )p or Down $utton# 2fter rearranging it should appear as 4 d8 Clic/ $, to close the window# E3 +imilarly reorder the other columns $y following the method descri$ed in step ( in following order# F3 Rename the columns of D3 presentation catalog# a8 E.pand the Products presentation ta$le# $8 Dou$leJclic/ the Prod !ame column, select the General ta$ in the Presentation Column dialog $o. and unchec/ the Use Logical %olumn !ame# c8 Change the column name $y typing Product !ame in the name field# d8 Clic/ $,# H3 Repeat the process till all the column of Products presentation ta$le get name as4
1ote4 2lternatively you could rename these columns in the !usiness Model = Mapping layer 6manually or using Rename wiKard shown previously8 I3 In order to meet end userBs requirement we have to hide;delete some columns from presentation %ayer which are not used $y users or are required in !usiness Model = Mapping layer# 9or this purpose you have to perform deletion of unnecessary columns4 a8 In the %hannels presentation column, select the %hannel Id and press Delete /ey from /ey$oard# $8 Clic/ 6es to delete the o$?ect# c8 +imilarly delete the following columns from the presentation ta$les#
Tale %olumn !ame Promotions Promo Id Times Time Id Products Prod Id Customers Cust Id &'3 Cerify the presentation ta$les for the changes you made# &&3 +ave the repository# Do not chec/ glo$al consistency# Tip4 Drag and drop the $usiness model from the $usiness model and mapping layer onto the presentation layer, this ensures faster creation of the presentation model# Testing and Aalidating 7epository %onsistency %hec5 !efore testing the repository $y running queries using racle !I 2nswers, you have to chec/ the consistencies of repository and its $usiness model# +teps of chec/ing repository are as follows: &3 If you havenBt open the racle !I 2dministration tool ?ust open it $y following steps# a8 +elect Start 5 Programs 5 $racle Business Intelligence 5 BI .dministration# $8 +elect ;ile 5 $pen 5 $++line# c8 Dou$leJclic/ D".rpd to open the repository file# d8 Enter the following parameters4 User4 2dministrator Pass4ord: 2dmin"&' e8 Clic/ $,# @3 +elect ;ile 5 %hec5 Gloal %onsistency 2Shortcut J 6ou can select the presentation catalog and press %T7L ? ,3 B3 If any error appears in Consistency Chec/ Manager, then edit the repository to correct the inconsistencies and rerun Chec/ <lo$al Consistency as in step "#
C3 Consistency Chec/ Manager can show three type of messages4 a8Error4 These messages indicate that there has $een some inconsistency in the model and need to $e fi.ed $efore querieng# If you get these errors then go through the error description and fi. it $efore proceeding# $8 Warning4 These messages show some warning messages which may or may not cause any errors# c8 Best Practices4 These messages are displays information a$out the $est practices, which can $e followed#
D3 n successfully and errorless appearance of Consistency Chec/ Manager, clic/ on %lose# E3 >eep the rpd open for the ne.t la$#
Updating the /8 4ith ne4 7PD and start $racle BI Ser<ices Instructions +teps for starting the 3%+ and updating the configuration using Enterprise Manager Starting the "LS "8 Run the script from the $elow location R2C%E:0MEPuser:pro?ectsPdomainsP$ifoundation:domainP$inPstart3e$%ogic#cmd &8 Ma/e sure the 3%+ running successfully as shown $elow '8 2lso verify that !I +erver we$ application is running properly $y logging into the 3%+ (8 %ogin to the )R% http4;;localhost4FII";console using $elow username;password given during the installation *8 2fter logging in go to Environment J5 +ervers# Mou can see the status of !I +erver li/e $elow ,8 1ow login to EM )R% http4;;localhost4FII";em using the same username;password used for 3%+ 3e have to do following steps to config !I server with our new RPD "# Create an encrypted /ey entry in the EM 6new feature from ""g8 &# Enter the new RPD name in the configuration "# Create an encrypted /ey entry in the EM 2fter logging in navigate to 3e$%ogic Domain J5 $ifoundation:domain %oc/ the domain li/e $elow $efore changing the configuration Clic/ on +ecurity J5 Credentials Clic/ on Create >ey Enter the Details li/e $elow +elect Map J5 oracle#$i#enterprise 6default for encrypted /ey8 >ey J5 repository#D3 6repository string with the RPD name8 Type J5 password 6always8 )sername;password J5 enter the administrator user with password 62dministrator;2dmin"&'8 Then clic/ on o/# 3ithout this /ey !I server wonBt upload the repository online# 2fter creating the /ey, we have to change the RPD that has to $e loaded to the memory# 1avigate to +ystem M!ean !rowser li/e $elow 2fter that go to +erver Configuration li/e $elow Enter the RPD name and clic/ on apply Then for ena$ling cache go to Performance Configuration +elect true for the cache ena$ling option and then clic/ apply 1avigate to !IDomain li/e $elow Clic/ on commit to complete your changes and ma/e it to the config files# Enter the value as Error 6so it throws only error8 and clic/ invo/e# Chec/ the configuration files whether the changes are into effect or not# Path: R2C%E:0MEPinstancesPinstance"PconfigPracle!I+erverComponentPcoreapplication:o$is"P1 -+Config#I1I To chec/ the we$cat location navigate li/e $elow to the Presentation+erverConfiguration +ee the parameter called 3e$Catalog+hared%ocation 1ow we are done with the Enterprise Manager settings# %et us start the !I services <o to !usiness Intelligence J5 coreapplication li/e $elow and clic/ on start Ma/e sure we have four components running 3e have not configured the scheduler so it wonBt run# 1ow 3%+ = !I services $oth are running# /naling Kuery logging "8 /nale query logging to see the $?ects $eing used and the +-% $eing issued to the data source $y the !I +erver# a89rom !IEE ""g 2dministrator user will not $e in RPD as they are coming from 3%+# $8 3e can set the log level only in online mode# c8pen the 2dmin tool after starting all the services d8 1avigate to Manage J5 Identity e8 Clic/ on 2dministrator f8 +et the log level appropriately and clic/ o/ g8 2fter that chec/ing the changes &8 +elect ;ile 5 Sa<e to save the D" repository, Clic/ !$ to chec/ glo$al consistency 6since consistency chec/ was ?ust performed8# '8 Close the 2dmin tool# />ecuting queries using $racle BI .ns4ers "8 %og in to racle !usiness Intelligence as the following parameters4 a3 Enter the following parameters4 U7L : http4;;localhost4HFI(;analytics User4 2dministrator Pass4ord: 2dmin"&' 3 Clic/ $,# &8 +ince we had made changes to the RPD 6log level changes8 after starting the services, 1ow we have to reload the metadata configuration which is loaded in the !I server following $elow steps# Clic/ on 2dministration after logging in Then clic/ on Reload 9iles and Metadata 1ow clic/ on 0ome ta$ and continue# '8 Clic/ on the 2nalysis and the clic/ on D3 su$?ect area to see the 2D 0C layer# (8 Clic/ on the D" +u$?ect 2rea in the right pane# *8 %etBs start with a simple query say state wise amount sold# In order to create a report for this, you have to first e.pand %ustomers folder and clic/ on State Pro<ince, then e.pand Sales folder and clic/ on .mount Sold# ,8 Clic/ on 7esults ta$ or Display 7esults $utton in the right pane# F8 It may ta/e few minutes to return the results as there are no filters# G8 The result is displayed as follows# H8 E.amine the .nalytics query log file# a3 pen Qracle !I installation directory 6generally D4PraclePinstancesPinstance&PdiagnosticsPlogsPracle!I+erverComponentPcoreapplication:o$is" P1--uery#log# +croll down to the $ottom of the file to locate the last query you e.ecuted# $7 the other method is4 3 <o to racle .ns4ers 5 Clic/ .dministration c3 Then clic/ Manage +essions to open +ession Management window d3 Manage +essions window opens# )nder .ction column, clic/ Aie4 Log lin/ to see entries of -uery log file# The +-% Request is seen as4 2s we had set the log level to F, we can full details li/e "# +-% Request &# +u$?ect 2rea Details '# %ogical Ta$le +ources %ist (# Caching Information *# E.ecution Plan ,# Physical -uery F# Row count Details# 2s we proceed in the course we will learn all these aspects# "I8 Clic/ the logout $utton to log out of racle 2nswers#