Sunteți pe pagina 1din 5

MERCK & Co.

ETL Mapping Specification

Detailed Design Specifications


Project Module/Component Folder Name Workflow Name(s) Session Name Mapping Name Publication Record Version 1.0 1.1 1.2 4.0 Review Version 4.0 Date Revised 10/13/2008 12/23/2008 3/18/2009 7/23/2010 Date Reviewed 07/26/2010 Primary Author Matt Gabel Matt Gabel Matt Gabel Sujoy Sarkar Reviewer Trent Lansing Summary of Changes Initial Document Reduced source qualifier SQL to only pull rep position to group practice records. Added lookup to WC_PARTY_LOGIN table and filter to remove records for positions that do not have an employee assigned to them Added REP_IND to identify the Rep records. Review Comments Changed value of $$POSITION_TYPE parameter to 'FIELD' US Customer Connect Analytics Account Position Visibility Rep SDE GCRMD_Custom_OLAP CustomSDE_AccountPositionVisibilityREP CustomSDE_AccountPositionVisibilityREP CustomSDE_AccountPositionVisibilityREP

Source System Initial Rows Short Description Load Frequency Preprocessing Post Processing Error Strategy Reload Strategy Notification Details

GCRMD warehouse (D_GCRMDW_D) ?

Target System Rows/Load

GCRMD warehouse (D_GCRMDW_D) ?

TBD N/A N/A Re-run workflow Re-run workflow On Failure: DAC notification emails On Success: DAC notification emails

Sources
Tables Table Name/File Name W_ALIGNMT_DH W_AFFL_CA_H W_PERSON_D W_ORG_D W_ORG_DH WC_PARTY_LOGIN Schema/Owner GCRMDW_D1 GDRMDW_D2 GCRMDW_D1 GDRMDW_D2 GCRMDW_D1 GDRMDW_D2 GCRMDW_D1 GDRMDW_D2 GCRMDW_D1 GDRMDW_D2 GCRMDW_D1 ODBC Connection D_GCRMDW_D D_GCRMDW_D D_GCRMDW_D D_GCRMDW_D D_GCRMDW_D D_GCRMDW_D Selection/Filter Informatica Connection DataWarehouse DataWarehouse DataWarehouse DataWarehouse DataWarehouse DataWarehouse

ETL Mapping Specification

Page 1 of 5

10/7/12

MERCK & Co.

ETL Mapping Specification

GDRMDW_D2 S_RESP S_PER_RESP S_USER SIEBEL SIEBEL SIEBEL P_NCM P_NCM P_NCM OLTP OLTP OLTP

Targets
Tables Table Name/File Name WC_POSTN_ORG_HS Insert X Schema Owner: Update Delete GCRMDW_D1 / GCRMDW_D2 Unique Key Informatica Connection DataWarehouse

Target File Location:


All target files must be written to the directory $PMTargetFileDir/proj_name/app_name. Please co-ordinate with the Informatica Administrator for more details. Target/Parameter Files File Name GCRMD_Custom_OLAP. CustomSDE_AccountPositionVisi bilityREP.txt Parameters Name $$DATASOURCE_NUM_ID $$POSITION_TYPE $$SIEBEL_SCHEMA Parameter/Variable Parameter Parameter Parameter Used Yes Yes Yes Description Used to populate datasource_num_id column in the target table. Used to populate the position_type column in the target table. Value is 'FIELD'. Used to indicate the schema name for Siebel tables. File Location $PMSourceFileDir (/gcrmdetl/data001/SrcFiles) Fixed/Delimited N/A Additional File Info Parameter file

Target Connection Information (For Development Environment) Database Name D_GCRMDW_D Schema/Owner GCRMDW_D1 GCRMDW_D2 Host String D_GCRMDW_ D

High Level Process Overview


This mapping stages data that represents account to position visibility for reps into WC_POSTN_ORG_HS. This data is derived from the data contained in the Analytics warehouse tables. The process will insert records from the source table into the target.

Pre-Processing Description
N/A

Processing Description
Source Qualifier:

ETL Mapping Specification

Page 2 of 5

10/7/12

MERCK & Co.

ETL Mapping Specification

---select positions and accounts SELECT t1.LVL1ANC_POSTN_ID POSTN_ID, t2.ACCNT_ID FROM ---get positions and aligned contact ids (SELECT a.LVL1ANC_POSTN_ID, a.ALIGN_ITEM FROM W_ALIGNMT_DH a WHERE A.ALIGN_ITEM_TYPE = 'Contact Id')t1, ---get affiliation for contacts (SELECT c.INTEGRATION_ID CONTACT_ID, d.INTEGRATION_ID ACCNT_ID FROM W_AFFL_CA_H b, W_PERSON_D c, W_ORG_D d, W_ORG_DH e WHERE b.FROM_CON_WID = c.ROW_WID AND b.TO_ACCNT_WID = d.ROW_WID AND d.ROW_WID = e.ROW_WID AND e.FIXED_HIER_LEVEL = 7) t2 ---join alignments to affiliations WHERE t1.ALIGN_ITEM = t2.CONTACT_ID
After the data has been retrieved from the source qualifier, a lookup will be needed. The lookup properties are as follows: Lookup - LKP_WC_PARTY_LOGIN Lookup Table: WC_PARTY_LOGIN Input Column: POSTN_ID SQL Override:

SELECT DISTINCT A.PARTY_ID FROM WC_PARTY_LOGIN A


Lookup Condition: POSTN_ID = PARTY_ID Output Column: PARTY_ID Lookup policy on multiple match: Use First Value After the lookup, create an Expression EXP_REP_ID to identify the REP positions from the Disconnected Lookup LKP_S_USER. Pass all the ports through this Expression. One new Output column should be created, SALES_REP_FLG = IIF(ISNULL(.LKP:LKP_S_USER(PARTY_ID)), N,Y) Disconnected Lookup LKP_S_USER Lookup Table: S_USER This is a Siebel table. DB connection should be defined likewise. Input Column: IN_PARTY_ID SQL Override:

SELECT U.LOGIN as LOGIN, U.ROW_ID as PARTY_ID FROM $$SIEBEL_SCHEMA.S_RESP R, $ $SIEBEL_SCHEMA.S_PER_RESP P, $$SIEBEL_SCHEMA.S_USER U WHERE U.ROW_ID=P.PER_ID AND P.RESP_ID=R.ROW_ID AND P.RESP_ID=R.ROW_ID AND R.NAME = 'MERCK REP'
Lookup Condition: IN_PARTY_ID = PARTY_ID Output Column: LOGIN Lookup policy on multiple match: Use First Value Pass all the ports forward including the new column, A filter will be needed to remove the records where PARTY_ID from the lookup is null. The filter properties are as follows:

ETL Mapping Specification

Page 3 of 5

10/7/12

MERCK & Co.

ETL Mapping Specification

Filter FLT_EMPTY_POSTN Filter Condition: NOT(ISNULL(PARTY_ID)) After the filter, an expression will need to retrieve the value of the $$DATASOURCE_NUM_ID and $$POSITION_TYPE parameters for the DATASOURCE_NUM_ID and POSITION_TYPE ports. After the expression, the data can be loaded directly into the target.

Post-Processing Description
N/A

Source To Target Field Matrix Source to target metrics mentions columns required for the US Commercial Model Analytics Rel1.0 only.

Target Table

Target Column

Datatype

Source Table

Source Column

Datatype

Expressio n

Comments

WC_POSTN_ ORG_HS WC_POSTN_ ORG_HS WC_POSTN_ ORG_HS WC_POSTN_ ORG_HS WC_POSTN_ ORG_HS

DATASOURCE_N UM_ID POSTN_ID ACCNT_ID POSITION_TYPE SALES_REP_FL G

NUMBER( 10) VARCHA R2(30) VARCHA R2(30) VARCHA R2(30) CHAR(1)

N/A W_ALIGNMT_D H W_ORG_DH N/A NA

N/A LVL1ANC_P OSTN_ID LVL1ANC_I D N/A NA

N/A VARCHAR 2(30) VARCHAR 2(30) N/A NA

Populated from parameter file generated by the DAC

Populated from parameter file generated by the DAC

Appendix 1:
SQL Code:

The OOTB SQL is as below:


Existing File Layout: File: Field Name Start Position End Position Length Type

New File Layout: File:

ETL Mapping Specification

Page 4 of 5

10/7/12

MERCK & Co.

ETL Mapping Specification

Field Name

Start Position

End Position

Length

Type

Work Flow Section:

References:

ETL Mapping Specification

Page 5 of 5

10/7/12

S-ar putea să vă placă și