Professional Documents
Culture Documents
1)
Hands-On Guide for Populating Time Dimension
Description:
BISP is committed to provide BEST learning material to the beginners, intermediate and advance learners. In the same series, we have prepared a complete end-to-end hands-on guide for populating the time dimension. The Document focuses on how to populate the Time Dimension from the transactional data source. It also demonstrates in details the various date functions. The guide designed considering the reader of the guide is ODI beginners. Download many such videos, student guides, lab guide, case studies and white papers from our blogs. Join our professional training program to learn from experts.
History: Version 0.1 0.2 Description Change Initial Draft Review#1 Author Upendra Upadhyay Amit Sharma Publish Date 5th Jun 2011 15th Jun 2011
www.hyperionguru.com
www.bispsolutions.com
Purpose
This Hands-On Guide designed to show how to populate the time dimension. This tutorial covers steps to create Data server, Physical schema, Logical Schema, Organizing Model in ODI 11g of Source and Target, Organizing Project & Import Knowledge Module, Create Interface (mapping) for Source Target, Execute session and finally validating the data in the Target.
TABLE OF CONTENTS
S.NO 1. 2. 3. 4. 5. 6. TITLE Introduction of Populating Time Dimension. Setting up Data server, Physical schema & Logical Schema in Oracle Data Integrator 11g. Organizing Model in ODI 11g of Source & Target. Organizing Project & Import Knowledge Module. Create Interface (mapping) for Source Target. Execute session & Validating Target Data. PAGE. NO. 03 04-12 13-18 19-21 22-36 37-40
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
2.2 Create Data server, Physical & Logical Schema for Source database
2.2.1 Create Data Server for Source. 1. Right click on Technology in Physical Architecture tab in Topology Navigator & click select New Data Server then insert information like Data Server name, Database Username and Password. 2. Insert information in JDBC driver. 3. Test Connection.
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
Fig. 05 Test connection. 2.2.2 Create Physical schema for Source database. 1. Right click on data server name such as SRCSG60STATM & select New Physical Schema. 2. Then scroll down schema and select correct user schema & work schema also where temporary table will store during execution & save it.
www.hyperionguru.com
www.bispsolutions.com
Fig: 07 Creating Physical Schema for SRC_ALMBI60STATM. 2.2.3 Create Logical Schema for Source database. 1. Right click on Logical Architecture tab in Topology Navigator & select New Technology. 2. Then scroll down schema and select correct physical schema & save it.
www.hyperionguru.com
www.bispsolutions.com
2.3 Create Data server, Physical & Logical Schema for Target
2.3.1 Create Data Server for Target . 1. Right click on Technology in physical architecture tab & select New Data Server then insert information like Data Server name, Database Username & Password. 2. Insert information in JDBC connection like JDBC Driver & JDBC URL. 3. Test Connection.
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
Fig. 12 Test connection. 2.3.2 Create Physical schema for Target. 1. Right click on data server name and select New Physical Schema. 2. Then scroll down schema and select correct user schema & work schema also where temporary table will store during execution & save it.
2.3.3 Create Logical Schema for Target. 1. Right click on Logical Architecture tab in Topology Navigator & select New Technology. 2. Then scroll down schema and select correct physical schema & save it.
www.hyperionguru.com
www.bispsolutions.com
3.1 Create New Model Folder & Model:3.1.1 Create New Model Folder :1. Right click on Model tab in Designer Navigator & select New Model Folder. 2. Insert Name of Model Folder & then save it.
www.hyperionguru.com
www.bispsolutions.com
Fig. 16 Create Model Folder. 3.1.2 Create Model for Source:1. Right click on Model Folder name such as Transformation & select New Model. 2. Insert information like Name, Technology, Logical Schema, Action group, Model Folder and then save it.
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
3.1.3 Create Model for Target:1. Right click on Model Folder name such as Transformation & select New Model. 2. Insert information like Name, Technology, Logical Schema, Action group, Model Folder and then save it.
3.2 Create data store for Target:3.2 .1 Creating data store for target:1. Right click on Model name such as TRG_ANSFORMATION_EXPRESSION.
2 3. 4. 5.
select New Datastore. Insert Information and then click on Column. Click to add column. And then save it.
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
4.1 Create New Project:4.1.1 Creating project:Right click on Project tab in Designer Navigator & select New Project. 2. Insert name of project & save it.
1.
www.hyperionguru.com
www.bispsolutions.com
4.2 Import Knowledge Module:5.2.1 Importing knowledge module:Right click on Knowledge Module in Project name such as "Transactional Model" & select Import Knowledge Module. 2. Import Knowledge Module from list of knowledge module.
1.
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
5.0 Create Interface B/W Source Target. 5.1 Create Interface B/W Source to Target:5.1.1 Create Interface b/w source to target:1. Right click on Interface in First Folder in Project Name such as Transaction Model & select New Interface. 2. Insert name of interface & select Optimization Context. 3. Open Property Inspector if not open & insert mapping query Implementation. 4. Insert mapping expression in Mapping Editor Window 5. Then Apply it & ok and execute in target mode.
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
Fig. 31 Click here to insert query(First select column name and then Implementation.
www.hyperionguru.com www.bispsolutions.com
in
5.1.3 Mapping Expression :- These are mapping expression, apply one by one.
S.No Column
N_DATE_SKEY D_CALENDAR_DATE N_HALF_CALENDAR N_MONTH_CALENDAR
Mapping Expression
TO_NCHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'YYYYMMDD') SRC_POPULATING_TIME.CALENDAR_DATE CASE WHEN TO_NCHAR(SYSDATE,'MM')>6 THEN 2 ELSE 1 END CASE WHEN TO_NCHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'MM')>6 THEN 2 ELSE 1 END CASE WHEN TO_NCHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'MM')<=3 THEN 1 WHEN TO_NCHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'MM')>3 AND TO_NCHAR (SRC _POPULATING_TIME.CALENDAR_DATE,'MM')<=6 THEN 2 WHEN TO_NCHAR (SRC_POPULATING _TIME.CALENDAR_DATE, 'MM')>6 AND TO_NCHAR (SRC_POPULATING_TIME.CALENDAR _DATE ,'MM')<=9 THEN 3 ELSE 4 END CASE WHEN TO_NCHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'MM') <=4 THEN 1 WHEN TO_NCHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'MM') <=8 AND TO_NCHAR (SRC_POPULATING_TIME.CALENDAR_DATE,'MM') >4 THEN 2 ELSE 3 END TO_NCHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'WW') TO_NCHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'YYYY') TO_CHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'DAY') TO_NCHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'DD') TO_NCHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'D') TO_NCHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'DDD') TO_CHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'YYYY')||'HALF'||TO_CHAR(CASE TO_NCHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'MM') <6 THEN 1 ELSE 2 END) TO_CHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'Mon-YYYY') WHEN
1. 2. 3. 4. 5.
N_QTR_CALENDAR
6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20.
N_TRIMESTER_CALENDA R N_WEEK_CALENDAR N_YEAR_CALENDAR V_DAY_NAME N_DAY_OF_MONTH N_DAY_OF_WEEK N_DAY_OF_YEAR V_HALF_PERIOD_NAME V_MONTH_PERIOD_NAM E V_QTR_PERIOD_NAME
TO_CHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'YYYY')||'-Q'|| TO_CHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'Q') TO_CHAR (SYSDATE,'YYYY')|| '-T' ||TO_CHAR (CASE WHEN TO_NCHAR (SYSDATE, 'MM')<=4 THEN 1 WHEN TO_NCHAR (SYSDATE,'MM')<=8 AND TO_NCHAR(SYSDATE, 'MM')>4 THEN 2 ELSE 3 END) TO_CHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'YYYY')||'WEEK'|| TO_NCHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'WW') TO_NCHAR(SRC_POPULATING_TIME.CALENDAR_DATE,'YYYY') SRC_POPULATING_TIME.CALENDAR_DATE.CREATED_BY SYSDATE
www.hyperionguru.com
www.bispsolutions.com
Fig. 33 D_CALENDAR_DATE
www.hyperionguru.com
Column Query
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
Fig. 48 V_WEEK_PERIOD_NAME
Column Query
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
5.1.4 Flow of data B/W Source to Target:- These value change in IKM SQL Control Append Flow tab. S.No 1. 2. 3. Name Flow Control Delete all Create Table Value False True True Description No Primary Key in Target Table Every Time load fresh data. Create table in Target Because we create table by data store in Model.
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com
www.hyperionguru.com
www.bispsolutions.com