We generate Surrogate Key in DW environment to maintain history and
we need a key other than Primary Key to uniquely identify the record.
Example: If EMPNO is the key, we can keep only one record in target for
the same Employee number and can’t maintain history, so we use Surrogate
key as Primary key and not EMPNO.
Informatica Sequence Generator:
1.Create a Sequence in Oracle.(considering the underlying DB as Oracle)
2.Access the Nxtval of that sequence in nInformatica by using below methods.
3.In Expression transformation take an extra output port and write the expression :SP.GETSEQVAL()
Hope this helps.
Informatica Sequence Generator:
- Passive and Connected Transformation
- The Sequence Generator transformation generates numeric values
- Use the Sequence Generator to create unique primary key values, replace missing primary keys, or cycle through a sequential range of numbers
1.Create a Sequence in Oracle.(considering the underlying DB as Oracle)
2.Access the Nxtval of that sequence in nInformatica by using below methods.
Using SQL Transformation:
Below is the mapping flow
1.Connect all input ports from source to SQL Transformation.
2.Add one extra output port which is attached with sequence generator query
3. Connect all ports from SQL tranformation to Relational Target. Once we do that we are done with the mapping.
3. Connect all ports from SQL tranformation to Relational Target. Once we do that we are done with the mapping.
Use Stored Procedure Transformation
Below is the mapping flow:
1.Create a procedure or function in the DB .Here i'm using function.
CREATE OR REPLACE function SCOTT.getseqval return integer
is
next_val integer;
begin
select supplier_seq.nextval into next_val from dual;
return next_val;
end getseqval;
/
is
next_val integer;
begin
select supplier_seq.nextval into next_val from dual;
return next_val;
end getseqval;
/
2.Import the function into informatica using Stored procedure transformation.
a.Select Stored Procedure transformation, import stored procedure dialog box opens.connect to the db and select the function and click ok.
3.In Expression transformation take an extra output port and write the expression :SP.GETSEQVAL()
4.Connect the ports from Exp to Target.
Hope this helps.
Please leave your comments , suggestions or Queries.
the above example is for a single primary key..If we have composite keys how to do it..
ReplyDeleteCan we do it with a lookup transformation - useful because the lookup transformation is disconnected and doesn't have to be called for every record.
ReplyDeleteThis is a great website .Relevant!! I finally found something that helped me. I have read all the suggestions here. Do you know How to apply for visa to Turkey ? The process is very simple and it is totally online based. It is a time saving activity.
ReplyDeleteMMORPG
ReplyDeleteInstagram Takipçi Satin Al
tiktok jeton hilesi
TİKTOK JETON HİLESİ
Antalya Saç Ekim
İnstagram takipçi satın al
Instagram takipçi
Mt2 Pvp Serverlar
takipci
Yeni Perde Modelleri
ReplyDeletesms onay
TURKCELL MOBİL ÖDEME BOZDURMA
Nft nasil alinir
ANKARA EVDEN EVE NAKLİYAT
trafik sigortasi
dedektör
web site kurmak
aşk kitapları
smm panel
ReplyDeleteSMM PANEL
https://isilanlariblog.com
İnstagram Takipçi Satın Al
HİRDAVATCİBURADA.COM
beyazesyateknikservisi.com.tr
Servis
Tiktok jeton hile
alsancak
ReplyDeleteçankırı
düzce
gaziemir
kaş
FFAH