Using Variables in Object Properties

Working with Procedures, Variables, Sequences, and User Functions 12-19

12.3 Working with Sequences

This section provides an introduction to sequences and describes how to create and use sequences in Oracle Data Integrator.

12.3.1 Introduction to Sequences

A Sequence is a variable that increments itself automatically each time it is used. Between two uses, the value can be stored in the repository or managed within an external RDBMS table. Sequences can be strings, lists, tuples or dictionaries. Oracle Data Integrator sequences are intended to map native sequences from RDBMS engines, or to simulate sequences when they do not exist in the RDBMS engine. Non-native sequences’ values can be stored in the Repository or managed within a cell of an external RDBMS table. A sequence can be created as a global sequence or in a project. Global sequences are common to all projects, whereas project sequences are only available in the project where they are defined. Oracle Data Integrator supports three types of sequences: ■ Standard sequences , whose current values ares stored in the Repository. ■ Specific sequences , whose current values are stored in an RDBMS table cell. Oracle Data Integrator reads the value, locks the row for concurrent updates and updates the row after the last increment. ■ Native sequence , that maps a RDBMS-managed sequence. Note the following on standard and specific sequences: ■ Oracle Data Integrator locks the sequence when it is being used for multi-user management, but does not handle the sequence restart points. In other words, the SQL statement ROLLBACK does not return the sequence to its value at the beginning of the transaction. ■ Oracle Data Integrator standard and specific sequences were developed to compensate for their absence on some RDBMS. If native sequences exist, they should be used. This may prove to be faster because it reduces the dialog between the agent and the database. The following sections describe how to create and use sequences.

12.3.2 Creating Sequences

The procedure for creating sequences vary depending on the sequence type. Refer to the corresponding section: ■ Creating Standard Sequences ■ Creating Specific Sequences ■ Creating Native Sequences

12.3.2.1 Creating Standard Sequences

To create a standard sequence:

1. In Designer Navigator select the Sequences node in a project or the Global

Sequences node in the Others view. 2. Right-click and select New Sequence. The Sequence Editor opens.