Sie sind auf Seite 1von 2

Create/Design/Implement SCD Type 1 Mapping in Informatica

Q) How to create or implement or design a slowly changing dimension (SCD) Type 1


using the informatica ETL tool.

The SCD Type 1 method is used when there is no need to store historical data in the
Dimension table. The SCD type 1 method overwrites the old data with the new data in
the dimension table.

The process involved in the implementation of SCD Type 1 in informatica is


Identifying the new record and inserting it in to the dimension table.
Identifying the changed record and updating the dimension table.

We see the implementation of SCD type 1 by using the customer dimension table as an
example. The source table looks as

CREATE TABLE Customers (


Customer_Id Number,
Customer_Name Varchar2(30),
Location Varchar2(30)
)

Now I have to load the data of the source into the customer dimension table using
SCD Type 1. The Dimension table structure is shown below.

CREATE TABLE Customers_Dim (


Cust_Key Number,
Customer_Id Number,
Customer_Name Varchar2(30),
Location Varchar2(30)
)

Steps to Create SCD Type 1 Mapping

Follow the below steps to create SCD Type 1 mapping in informatica


Create the source and dimension tables in the database.
Open the mapping designer tool, source analyzer and either create or import the
source definition.
Go to the Warehouse designer or Target designer and import the target definition.
Go to the mapping designer tab and create new mapping.
Drag the source into the mapping.
Go to the toolbar, Transformation and then Create.
Select the lookup Transformation, enter a name and click on create. You will get a
window as shown in the below image.

Select the customer dimension table and click on OK.


Edit the lkp transformation, go to the properties tab, and add a new port
In_Customer_Id. This new port needs to be connected to the Customer_Id port of
source qualifier transformation.

Go to the condition tab of lkp transformation and enter the lookup condition as
Customer_Id = IN_Customer_Id. Then click on OK.

Connect the customer_id port of source qualifier transformation to the


IN_Customer_Id port of lkp transformation.
Create the expression transformation with input ports as Cust_Key, Name, Location,
Src_Name, Src_Location and output ports as New_Flag, Changed_Flag
For the output ports of expression transformation enter the below expressions and
click on ok

Das könnte Ihnen auch gefallen