Call DB Sequence From Talend

Capture
Hello Readers,
Today we will discuss how call db sequence from Talend while loading data. For demo purposes we have taken Oracle as our Database.STEPS:
1) Create a sequence in Database using : –create sequence test_seq start with 1 increment by 1;
The above statement will create a sequence in Oracle Databse.
select test_seq.nextval from dual;
This statement is very important as it will initialize your sequence.2)Take a source file/Databse and connect it to your oracle output component with all schema defined at Target Level.

call db sequence from Talend

call db sequence from Talend


3)Go to Advance Setting Tab of oracle output component and change the settings as defined in the screenshot.

call db sequence from Talend

call db sequence from Talend

seqence_name.nextval is the command which you have to write in SQL Expression. so that for every row this expression will call your Sequence present at Database Level.

Thanks For Reading……

Talend Interview Questions

Author:- Ankit Kansal & Nayan Naik