Académique Documents
Professionnel Documents
Culture Documents
Purpo ose
This tuto orial shows you how to use the Oracle BI Ad o O dministratio Tool to b on build, modify y, enhance and manage an Ora e, acle BI repo ository.
Duration
8 Hours
Prereq quisites
Access to th OBIEE Administration Tool on the OBIEE server ma A he A E achine on company Do omain or Am mazon Insta ance. Access to OBIEE Answ A O wers and Da ashboards on OBIEE server mac chine on company Do omain or Am mazon Insta ance.
Oracle BI Se O erver provid the com des mmon busin ness model and abstra l action layer for r th analytics applications like BI Answers and Dashboa he s A ards. It supports access to multiple data sources, iincluding re t a m a elational databases (O Oracle, SQL Server, and so on), OLAP sour a rces (Analy ysis Service Oracle es, OLAP) and offline sour O o rces (Excel, XML, and so on). , It performs two primary functions: t t y 1 Compiling incoming Logical que request into exec g ery ts cutable phy ysical query g s physical so ources back to analytic k cs 2 Returning the results from the p applicatio ons Clients of Or C racle BI Server see a logical sche ema view in ndependen of the sou nt urce physical database sche emas. It exposes it services through a standard t ts s ODBC 2.0 compliant interface. O It also has necessary server infras t n s structure su as sess uch sion and qu uery managemen cancellation, statistics logging, monitoring and othe server m nt, g, er administratio functions on s.
Oracle BI Serv e ver: (Acc cessing BI Serve Inform er mation b other by Applic cations)
O erver prese ents itself to other appllications as an ODBC 2.0 data o s Oracle BI Se source. This means that virtually any ODB T BC-capable report writ or query tool can use e ter y Oracle Analy O ytics as if it were a dat t tabase.
1. Physical lay P yer To import metadata from datab t bases and o other data s sources into the o Physical layer l To specif Physical joins betwe Fact an Dimensio tables. fy j een nd on 2. Business Model/Mapp B M ping layer To simplif and reorg fy ganize the imported m metadata int business to s models Contains logical colu umns arran nged in logic tables, l cal logical joins s, erarchy definitions. and dimensional hie Contains the mappin from the logical co ngs olumns to th source d he data ysical layer r. in the Phy 3. Presentatio layer P on Structure the busine model fo presenta ess or ation to use who request ers business intelligence informatio via clients such as Oracle BI e on Answers and Interac ctive Dashb boards Oracle BI Adminis B stration To Buildin the Phy ool: ng ysical Laye er To build the Physical la T ayer, you pe erform the f following st teps: te epository Creat a new Re Creat an ODBC Data Sou te C urce/or Native Data So ource (Whic chever is ap pplicable in your case? ?) Impor Metadata into the Physical Lay rt a yer Creat Aliases as needed te a Creat Physical Joins te Create a Ne Reposit C ew tory Stop the Ora S acle BI Serv if it is ru ver unning: Click Start > Pro ograms > Administrativ Tools > Services ve In the Services dialog box, stop the O e , Oracle BI Se erver servic as show ce wn below w:
Click Start > All Programs > Oracle Bu usiness Inte elligence > Administra ation to ope the Orac BI Administration T en cle Tool. Click File > New to open th New Rep w he pository dia alog box as shown:
In the New Repo e ository dialo box, the Repositor folder is selected by og ry y defau By defau the file name is Me ult. ult, etadata1.rp Name th file to pd. he samp plesales_ex x.rpd
Click Save. The new repos sitory opens in the Adm s ministration Tool and ays mpty layers s displa three em
Create an ODBC Data Source /o Native D C O a or Data Source e In this exam n mple, we will be using the Oracle N l Native Call Interface (OCI 10g/11 1g) Driver, so th D here is no need to crea ODBC D ate Data Sourc on the sy ce ystem. Ensure the Native Data Source ex E N a xists and wo orks fine. For that, if Oracle Clien is installe on you m F O nt ed machine, na avigate to th Oracle he Client Install folder. In this case it is as show n below: C l t
Open the tns O snames.ora file to see its content as shown: a e ts (It should ha the tnsn ave names.ora stanza (xxe in our c ew case) that p points to the e Database th we are going to imp tables/ D hat g port /views from m:
Im mport Meta adata into the Physic Layer cal Select File > Import > from Databa as show S f ase wn:
Here, select OCI 10g/11g in the Connection Type drop down list and enter the H t C fo ollowing details for all the other fie elds as sho own below:
Click OK. Yo will get the Import window listiing out the Schemas in this DB. C ou t w + Select the sc S chema xxew as shown below (cliick on the + icon to e w n expand and show all the DB objects in the sch s hema:
NOTE: As you can see from the above fi A igure, we have selecte Tables, Keys, View ed ws and Fore eign Keys to be shown here. t n Select all the tables tha you need to import iinto the rpd (select mu S e at d d ultiple ta ables/views by pressin Ctrl key). We will be importing: s ng e Customer C Employee E Market M Orders O Product P Segment S Time_Date T Time_Month T FactsInv F FactsRev F
Click Import. You will get the Conn C nection Poo Propertie Window as shown ol es below:
Leave all the values to their defau and clic OK. You will see the Importing e ults ck e screen till all objects ar imported. Once don click Clo to close the Impor re ne, ose e rt Window. You will see a new Database objec in the Phy W ct ysical layer called xxe ew as shown be elow:
Double click the Databa xxew. You will get the Datab D k ase Y t base Proper rties Windo ow. Change the Name field to Sample Sales DS (DB) as sh C d e hown below w:
Double click the Physic Schema XXEW. Yo will get t Physica Scheme D k cal a ou the al you Properties window. Rename the schema to t required name so y are able to P w s the d id dentify the source of th data. NO s he OTE: We wiill be leavin it as it is: ng :
You will get the Check global con Y k nsistency w window as s shown:
Click Yes. C You will get a warning message in Y ndicating th the Adm hat ministrator u does no use ot have a pass sword. Click close on the Consiste k ency Checker Window w:
To get rid of this warnin Click Ma T f ng, anage -> S Security. Se elect Users in the list a and you will see Administra user in the right pa ator ane. Double click on th e he Administrato user. You will the Us Propert A or u ser ties window as shown: w
Here, in the Password and Confirm Passwor fields, en Adminis H m rd nter strator. Clic ck OK. Close th Security Manager Window. O he y W To verify tha that conn T at nection pool is pointing to the righ instance and valid, r g ht right click on any of the table From the popup me e. e enu, select Update Row Count as w s shown:
You should get the num Y mber of reco ords in the table next to the table name in e brackets as shown: (T This indicat that the connection pool is fin and is ab to reach the databa tes n ne ble h ase to fetch the DB Objects Metadata) o s )
Create Alias as nee C ses eded Aliases are created in the Physica Layer bef A c t al fore creatin the Phys ng sical Joins between the tables. This is done so that: e s
o Any specific Nam s ming Conve entions can be followe (Create a n ed aliases bas sed on yo compan naming convention or a con our nys g ns nvention tha makes at inden ntifying, organizing and managing Fact an D d g Dimension T Tables easy y) o To av void circular Joins. Ex: If you have Ordered Date and S r : e Shipped Da in ate the fa table, yo will need to create 2 aliases of the Dates table one for act ou d f s e Order Date an the othe for Shippe Date. red nd er ed
Right click on the Custo R o omer Table and select New Obje -> Alias from the e t ect Popup menu In the Alias Physica Table win P u. al ndow, Enter the name Dim r Customer in the Name field and click OK: C n
You will see the new Alias for Cus Y stomer table in the Phy e ysical layer as shown: r :
NOTE: The conven T ntion that we are follow w wing is App pend Dim before th Dimensio he on Tables and Fact before th Fact tables. There m a he might be ma more n any naming conventions and st tandards wh hich you co ould follow. Similarly cre S eate aliases for all the Original tab s bles in the Physical La ayer. You w will get as below w:
Create Phys C sical Joins s The next ste is to crea the Phy T ep ate ysical Joins between F Fact Table/s and s Dimension Tables. (So that they fo a Star Schema as discussed in the Initial D T orm s d Tutorial). T Let us first create the star schema for the Re c s a evenue Fac (Fact FA ct ACTSREV) ). Select This fact and all the Dimension tables that will be joined to i as shown S f s e it n below and ri ight click on the select n tion. From t Popup menu, sele Physica the ect al Diagram -> Selected Object(s) Only as sho D O O own below:
NOTE: If the Zoom level here is too big, you can red I m duce it to 7 75% or 50% etc by righ % ht clicking in this wind dow and selecting the Zoom men item as s nu shown:
Now to create a Physic Join betw N cal ween Dim Customer and Fact FACTSR REV, click once on the New foreign ke button o the toolb as show below: o w ey on bar wn
Then Click once on the Dim Em T o e mployee tab and then click on Fact ble n FACTSREV table as sh F V hown below w:
Here, click on CUST_K H o KEY on the left list box (for Dim CUSTOME and x ER) CUST_KEY in the right list box (fo Fact FA C t or ACTSREV) The Join expression will ). be shown in the Expres ssion box as shown ab a bove. Click OK. Yo will get the following message C ou t e:
Click Yes. C
NOTE: This will automatically create CUST_KEY as the Prima Key in th Dim T s ary he CUSTOMER table. . You will see that the Jo between the 2 table has bee created a shown: Y oin n es en as
Similarly Cre S eate the following Join for the ot ns ther tables: Dim E_MONTH".ROW_WID = "Fact - FACTSREV D V".BILL_MT TH "D - TIME "D - TIME Dim E_DATE".RO OW_WID = "Fact - FA ACTSREV". .BILL_DT "D - ORDERS".ORD Dim DER_KEY = "Fact - FA ACTSREV".ORDER_K KEY "D - PROD Dim DUCT".PRO OD_KEY = "Fact - FA ACTSREV".PROD_KEY "D - MARKET".MKT_ Dim _KEY = "Fa - FACTS act SREV".MKT T_KEY "D - EMPL Dim LOYEE".EM MPLOYEE_ _KEY = "Fa - FACTS act SREV".SRE EP_KEY
Similarly, cre S eate the Inv ventory Sta schema b selecting the follow ar by g wing tables:
"Dim - TIME_MONTH".ROW_ T _WID = "Fact - FACTS SINV".PER_ _MTH "Dim - MARKET".M M MKT_KEY = "Fact - FA ACTSINV".M MKT_KEY "Dim - PRODUCT".PROD_KE = "Fact - FACTSIN V".PROD_ P EY _KEY You will the get the follo Y owing Star Schema:
Oracle BI Adminis B stration To Busine Model and Mapping Layer ool: ess
(NOTE: Business Model and Mapping Lay is also r B M M yer referred to a BMM Lay as yer)
To creat a new Business Model and M te Mapping La ayer: Creat a Busine Model te ess Creat te/Drag in Logical Tab L bles Creat te/Ensure that the Log gical Joins a in place are e Rena ame Business Model Objects O Delet Unneces te ssary Busine Model Objects ess Set Fact Measur Aggrega F re ates Columns Creat the need addition Logical C te ded nal Build Dimension Hierarchie (optionall) n es
s Create a Business Model In the Business Model and Mapping Layer, right click the w e d L t white space and select e t New Business Model as shown: w
The Busines Model window will be shown. E T ss b Enter the name for the New e Business Mo B odel as Rev vInv DB BM and give some des M, e scription as shown:
Click OK to close this dialog box. You will se e the new ( C d (empty) bus siness mod del as shown:
NOTE: The red sym T mbol on the business model indic e cates it is n yet enab not bled for querying We will enable the business model for querying later after the P g. e b r Presentation layer is defined for this Busine Model and the rep d ess a pository pas sses a global consistency check. Create/D Drag in Logical Table es Drag and drop the required Ph d r hysical Tablles to the n newly create Business ed Model Folder as sh F hown:
NOTES: bles are Yel llow in color. - Fact Tab - Dimensio Tables are White in color as s on a n shown abov ve.
Create/E Ensure tha Logical Joins are in place at J To view the logical Join at the BM Level, r T ns MM right click th Fact tab Fact he ble FACTSREV and from the popup menu selec Business Model Di F V t m ct s iagram -> Selected Ta S ables and Direct Join as show n below: D ns
You will get the Logical Table Diag Y l gram windo as show ow wn:
NOTE: This might not be the case sometimes. In th case, sin we drag T c his nce gged in all these tables in one go from th Physical Layer, bas on the P e he sed Physical Jo oins, the BI Admin to automatically created the Log ool gical Joins c correctly. If you dr and dro objects in rag op ndividually, you will ha to manu ave ually create the Logica e al Joins. We will see this in the next section. s t nd e e ACTSINV fr rom the Ph hysical laye to the B er BMM Drag an drop the fact table Fact FA as show wn:
Now check if the logica Joins are in place. S N i al Select Fact FACTSI t INV, Dim Time_MONT Dim PRODUCT Dim MA T TH, T, ARKET from the BMM and right click M on the selec ction. From the popup menu sele Busine Model D m p ect ess Diagram -> > Selected Ta S ables and Direct Join as show n below: D ns
NOTE: We have se W elected thes tables because we know that all of them are joined se together as part of one Star in the Physic Layer. r n cal In the Logica Table Dia n al agram we see this: s (N NOTE: You see that th u here is no Logical Join on this Fa to any of the L n act f Dimensions) D )
To create Lo T ogical Joins Click onc on the N s, ce New comple join butto on the ex on to oolbar as sh hown:
Now click on the Dim PRODUCT table onc and then click on Fact N n ce n FACTSINV table as shown: F
A om ve e NOTE: As seen fro the abov screen, in the logica joins, we dont specify any al columns but just th type of jo (1-1, 1-N or N-N) b s, he oin between the tables. W can also e We
_________ ______________________ ____________ ____________ ____________ ____________ ____________ _____
specify which is the Driving table and wh kind of jo is needed (Inner, L Outer, w e hat oin Left Right Ou uter, Full Outer) etc de epending on your spec requirements. cial For now just accept the default se F t e ettings and c click OK. Y will see the Logica You al Join has bee created between th two table as shown: en he es
Similarly, cre S eate the rem maining 3 jo oins as welll and you s should get t followin the ng:
Do a global consistency check fro File -> C D om Check Global Consiste ency as sho own:
You will get the error message saying the Bu Y m usiness Model does no have a ot correspondin Subject Area: ng
To overcome this, crea a Subjec Area in th Presenta T ate ct he ation Layer by draggin r ng and dropping the whole Business Model fold er there as shown: e s
Now if you do the cons N d sistency che again, y will get the following: eck you t
Click Yes an close the Consisten Check M C nd e ncy Manager w window that pops up ne ext.
e s bjects Rename Business Model Ob Now, give meaningful names to Tables and C N m n Columns th the Users/Business hat s understand. We will use the Renam Wizard to rename a the selec W me o all cted Objects in the BM MM la ayer in one go. Click Tools > Utilities. You will ge the follow C et wing window as shown w n:
In the Utilitie dialog bo click Re n es ox, ename Wiza and the Execute as shown: ard en e
You will get the Renam Wizard as shown be Y me a elow. Here, click the B Business Model and Mapping ta and sele the Rev M ab ect vInv DB BM business model (exp M pand it). Select all the objects (Tables) there and c l t click the Ad Heirarchy button as dd y s shown:
efault settin and clic Next. In t next sc ngs ck the creen, specify the rules for s Leave the de enaming as shown: s re Select All tex lowercas and click Add as sh S xt se k hown:
Click Chang specifie text. In th Find box type an u C ge ed he x, underscore. In the Replace box type a sp R x, pace as sho own:
Click First le C etter of eac word ca ch apital and c click Add a shown: as
Click Next. In the Finish screen, re C h eview the o objects that are to be r renames an nd click Finish as shown: a
You will see that all the selected objects in th BMM ha been renamed Y e o he ave according to the specified rules: o
Now rename the Tables (or colum N e mns) manua if you fe the need to. Here w ally eel d we will be renam w ming few of the Table names as f f follows:
U ary ess O Delete Unnecessa Busine Model Objects Now you can delete an of the columns or ob N n ny bjects that w not be u will used in the e Presentation Layer. P n
es Set Fact Measure Aggregate n ation rule fo all the Measure or In the BMM, you need to specify the Aggrega Columns tha are there in the vario Fact Ta C at e ous ables. In our case, we have 2 fact tables now: Fact Inventory (with one measure: n s y Value) and Fact Reve V F enue (with 2 measures Dollars a Units). All the 3 s: and measures ar highlight below: m re ted
In order to specify the Aggegration rule, doub click on the measu (Dollars In n A n ble n ure s). th Logical Column Window that opens, sele the Aggr he C o ect regation Ta Select S ab. Sum in the Defau Aggregat n ult tion rule dro down lis as shown op st n:
Click OK. C Repeat the same for th other 2 measures as well. R s he m NOTE: In most of the cases, the measures a aggrega N c m are ated as Sum but you m, could also have Avg, Max, and Co M ount Etc, de epending on the requirements, as s shown below w:
You will see the Sigma symbol for all the Me Y r easure colum now as shown: mns
B stration To Buildin the Pres ool: ng sentation L Layer Oracle BI Adminis Will be covered in the next session. c t
Summ mary
This cou urse covere ed The Oracle BI Server over S rview. pository file overview. e The OBIEE Rep le nistration To to build, modify, en ool , nhance, and manage a an Using the Oracl BI Admin Orac BI repos cle sitory.
Thank You k
Than you for jo nk oining us to oday in this Oracle Bus siness Intel lligence Us Training ser