Using an Oracle sequence while inserting data
You can genarate automatically primary key values while inserting data, using the sequence defined in Oracle.
In Talend Studio, the sequence is used in the Additional columns table, in the Advanced settings tab of the tOracleOutput component. Additional Columns are designed to handle DB columns which need DB SQL instructions.
The following example illustrates how to use an Oracle sequence while inserting data.
Create the Oracle table and sequence
Procedure
Read data from a text file and insert the data into Oracle's PERSON table
Before you begin
- You have created a text file, called person_table.txt,
containing the following
information.
Shong;30;CN Ross;34;US Patrick;27;FR Pedro;28;CN
Procedure
Set the input component
Procedure
Set the output component
Before you begin
- You have created the Oracle table and sequence.