Tuesday, September 28, 2021

ODI - Use of sequence object in a surrogate key

A Surrogate key in SQL server is a unique identifier for each row in the table. This type of key is either db generated using sequence or guid or generated via another application.

Use case: we will create a sequence in target db schema and use it in the mapping.

Step1: Create a sequence in Target shema:

Create sequence TRG.SEQ_JOBS

Minvalue 1

Maxvalue 999999999

Start with 1

Increment by 1;

Step2: once map done , slect the key field which to be unique and add the squence.nextval in the expression.

TRG.SEQ_JOBS.nextval


Use optimization context in the physical tab and Use IKM and LKM as needed.

No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...