aggregate-function-transformation.pdf

Upload: venkatarao-yanamadala

Post on 06-Jul-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    1/30

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    2/30

    www.hyperionguru.com  www.bisptrainings.com

    Description:BISP is committed to provide BEST learning material tothe beginners and advance learners . In the same series ,

    we have prepared a complete end-to end Hands-on guide

    for building financial data model in Oracle Data

    Integrator.The document focuses on how the real world

    requirement should be interpreted. The mapping

    document template with very simplified steps and screen

    shots makes the complete learning so Easy . The

    document focuses on how to calculate the aggregatefunction .Join our professional training program and

    learn from experts.

    2

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    3/30

    www.hyperionguru.com  www.bisptrainings.com

    S.NO TITLE SLIDE NO.

    1 Introduction 4

    2 Data Model 5

    3 ETL Mapping 10

    4 Database Connectivity 13

    5 Bringing Metadata 19

    6 Creating Interface 23

    7 Required Output 28

    8 Q&A 30

    3

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    4/30

    www.hyperionguru.com  www.bisptrainings.com

    Calculate Aggregate Function in Target in Oracle Data Integrator .

    In this example, we calculate aggregate function in Target . There are

    following Step to follow to calculate aggregate function in Oracle Data

    Integrator.

     Create master and work repository in Oracle Data Integrator.

     Import source database and Target table .

     create mapping and drag and drop source and target table into

    mapping designer window.

     Establish a connection of source and target technology with that of

    particular database.

     Create a model and Reverse Engineering the datastore according to

    the technology.

     Create new interface inside project and then come to mapping taband make a mapping between source and target datastores.

     Then create aggregate transformation to group by column.

     Then come to flow tab and define the knowledge module based on

    source and target.

     Then save and Execute Interface and see the result in operator

    navigator and view the result in target datastore

    Introduction

    4

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    5/30

    www.hyperionguru.com  www.bisptrainings.com

    Below Is the Data Model of GoSales

    5

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    6/30

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    7/30www.hyperionguru.com  www.bisptrainings.com

    Source Data

    7

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    8/30www.hyperionguru.com  www.bisptrainings.com

     Target Table StructureBelow is the Table structure of the TRG_ORDER_DETAILS target table in oracle

    database.

    8

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    9/30www.hyperionguru.com  www.bisptrainings.com

     TARGET DATA

    9

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    10/30www.hyperionguru.com  www.bisptrainings.com

    What is ETL Mapping document ?

    ETL mapping Documents contains source , staging area , target

    and the Business Rules Information and it is most important

    document for the developer . And Below is my Mapping Document

    which contains

     Source File Name Source Field Name

     Source Field Data Type

     Source Field Length

     Source Field Description

     Business Rule Staging Area

     Target Table Name

     Target Field Name

     Target Field Data Type

     Target Field Length10

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    11/30www.hyperionguru.com  www.bisptrainings.com

    Source : Used Oracle as my Source Database.

     Staging Area : Used oracle as my Staging Area.

     Target : Used Oracle as my Target Database.

    After Mapping we have to Review from the EndUser and then sign

    off From them.

    BEFOREMAPPING_ORDERDETAIL.xlsx 

    AFTERMAPPING_ORDERDETAIL.xlsx 

    11

    http://www.hyperionguru.com/http://localhost/var/www/apps/conversion/tmp/scratch_1/BEFOREMAPPING_ORDERDETAIL.xlsxhttp://localhost/var/www/apps/conversion/tmp/scratch_1/AFTERMAPPING_ORDERDETAIL.xlsxhttp://localhost/var/www/apps/conversion/tmp/scratch_1/AFTERMAPPING_ORDERDETAIL.xlsxhttp://localhost/var/www/apps/conversion/tmp/scratch_1/BEFOREMAPPING_ORDERDETAIL.xlsxhttp://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    12/30www.hyperionguru.com  www.bisptrainings.com

    Staging Area:  A place where data is processed before entering the warehouse. Staging Area is temporary location where data from source systems is

    copied. A staging area is mainly required in a Data Warehousing Architecture

    for timing reasons. In short, all required data must be available before data

    can be integrated into the Data Warehouse 

     Here I have used Scott schema as staging table and you have to define

    staging table inside the physical schema at the time when you are establishing

    connection between oracle database and oracle data integrator.

    12

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    13/30www.hyperionguru.com  www.bisptrainings.com

    DATABASE CONNECTIVITY IN

    ORACLE DATA INTEGRATOR

    13

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    14/30www.hyperionguru.com  www.bisptrainings.com

    Now I have to establish a connection between oracle and ODI .For

    establishing A Connection come to the Topology Navigator .select Oracle

    as Technology ,Right Click oracle and select New DataServer .In this wehave to provide value to Name , Instance , Dba UserName , Password and

     JDBC Driver.

    14

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    15/30www.hyperionguru.com  www.bisptrainings.com

     This will establish a connection between oracle and ODI

    15

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    16/30www.hyperionguru.com  www.bisptrainings.com

    And Now Right click DataServer and select Physical schema . Here you

    have To fill information like Schema and work Schema.

    16

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    17/30www.hyperionguru.com  www.bisptrainings.com

    After creating Physical Schema in DataServer which helps in establishing

    connection With a particular schema , Now Create a context like Development ,

    production and Testing Which helps to make a mapping between physical and

    logical Architecture.

    How to create context ? Just click on the context tab and then on the Right side of context tab you will

    find new Context options ,select that “New Context” and create a context for

    Development ,Production and Testing and If anything else is there than createthat one also.

    17

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    18/30www.hyperionguru.com  www.bisptrainings.com

    After Context create a Logical Schema for Oracle .

    How to create Logical Schema ?

    Click on Logical Architecture ,Then select oracle technology .Right Clickoracle and Select logical schema and provide information as shown in

    below diagram.

    18

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    19/30www.hyperionguru.com  www.bisptrainings.com

    HOW TO BRING METADATA

    FROM DATABASE TO

    ORACLE DATA INTEGRATOR

    19

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    20/30www.hyperionguru.com  www.bisptrainings.com

    After establishing a connection between oracle and ODI ,go to the Designer

    Navigator Here you have to bring the metadata of customertrans datastore .For

    this you have to create Model folder and sub model for organizing datastore.Right click LOAD_ORACLE ,

    20

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    21/30www.hyperionguru.com  www.bisptrainings.com

    And Select New Model and fill all details provided in previous sheet and then

    select Reverse Engineering Button ,It will bring all the datastore available in thesales schema

    21

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    22/30www.hyperionguru.com  www.bisptrainings.com

    After bringing metadata from particular datastore on the

    model tab , click on the Project tab and here we have to applythe Required Business Rules using interfaces How to

    implement business rule in project tab ?

    Go to the Project tab , Expand first folder .Here you will find

    interface . Right click interface and select new interface .It willopen interface window , here you will provide Name of the

    Interface , Optimization context . Now click on the mapping

    tab . Here you will get 2 window one for the source and other

    for target like I am showing in the next

    Screen .

    22

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    23/30www.hyperionguru.com  www.bisptrainings.com

    CREATING INTERFACE IN

    ODI

    23

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    24/30

    www.hyperionguru.com  www.bisptrainings.com24

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    25/30

    www.hyperionguru.com  www.bisptrainings.com

    Here I have inactivate all the columns which I don‟t required by just click

    Particular column it will open property window and there uncheck Active

    Mapping.

    25

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    26/30

    www.hyperionguru.com  www.bisptrainings.com

    Click on the flow tab there you have to define required knowledge

    module and Make the option true or false depend on your requirement

    and then save and execute.By default staging area is in the target

    26

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    27/30

    www.hyperionguru.com  www.bisptrainings.com

    Below is the background code executed by odi for Aggregate Function min using

    group by clause.

    27

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    28/30

    www.hyperionguru.com  www.bisptrainings.com

    REQUIRED OUTPUT

    28

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    29/30

    www.hyperionguru.com  www.bisptrainings.com

    After successfully executing the interface select again target interface , Right

    Click target interface and select „data‟ .It will show the required output. 

    29

    http://www.hyperionguru.com/http://www.hyperionguru.com/

  • 8/17/2019 Aggregate-Function-Transformation.pdf

    30/30

    30

    http://www.hyperionguru.com/