Gooks
Gooks

Reputation: 53

How to implement update and insert in informatica

I have Phone table with columns :

Clien_ID,Phone_num,Phone_Extention,Phone_Type,Last_Updated_Dt,Created_Dt

I am getting fixed width flat file which I will loading in staging table in sql.

I have to update the records in Phone table in terms of phone_num,Phone_Extention,Last_Updated_Dt for each phone type (based on matching Client ID) if Last_Updated_Dt of flat file record is greater than existing Last_Updated_dt and insert a new record of phone type of client does not exist.

How can I implement in informatica.

Upvotes: 0

Views: 997

Answers (1)

Lars G Olsen
Lars G Olsen

Reputation: 1118

SRC->SQ->LKP->RTR->TGT_ins
                 \>UPD_upd->TGT_upd

The SRC is the flatfile, the LKP is against your target (match on Client_ID), the UPD_upd should be set to DD_UPDATE, and now for the 'hard' part, the router and its ports:

  • all ports from the LKP should be prefixed with 'LKP_' when going into the router
  • the ports from the flatfile should be prefixed with 'SRC_'
  • Configure the router with two 'groups' and name the groups: Insert and Update
  • The condition on the Insert group is easy: isnull(SRC_Client_ID)
  • The condition on the Update group in your case is: SRC_last_Updated_dt>LKP_last_Updated_dt

Upvotes: 1

Related Questions