Developer Transformation Guide > Sequence Generator Transformation > Sequence Data Object
  

Sequence Data Object

A sequence data object creates and maintains a sequence of numeric values. The Sequence Generator transformation uses the sequence data object to generate the values for the transformation.
You can use a reusable sequence data object in multiple Sequence Generator transformations. All Sequence Generator transformations that use the same sequence data object use the same sequence of values if they run on the same Integration Service. You can also use a reusable sequence data object in a non-reusable Sequence Generator transformation. You can use a non-reusable sequence data object a non-reusable Sequence Generator transformation.
For example, you create multiple mappings that write to the same primary key field in a relational table. Each mapping uses the same reusable Sequence Generator transformation, which uses the same reusable sequence data object and runs on the same Integration Service. Each mapping write unique values to the primary key field.

Creating a Sequence Data Object

To use a Sequence data object to create a Sequence Generator transformation, create the Sequence data object, configure the object properties, and select the object in the Sequence Generator transformation dialog box.
    1. In the mapping editor, scroll down in the mapping palette to locate the Sequence Generator transformation and drag it to the mapping.
    The New Transformations wizard opens.
    2. Click New Sequence Data Object.
    The New Data Object wizard opens.
    This screenshot shows the dialog box that appears when you want to create a new Sequence Object. It includes the object name and location. The location is the directory where you store your physical data objects.
    3. Enter a name for the Sequence data object.
    The naming convention for Sequence data objects is SEQ_<data object name>.
    4. Click Next to configure the Sequence data object properties.
    If you create a Sequence Generator transformation from the object, the transformation will use the properties you enter for the data object. The following image shows the properties that you can configure:
    This screenshots show the Sequence Object properties that you can configure: Start Value, End Value, Increment Value, and an option for Cycle. The default Start Value is 0. The default End Value is 9,223,372,036,854,775,807. The default Increment Value is 1.
    5. After you configure the data object properties, you can create a Sequence Generator transformation using the Sequence data object. When you create the transformation, name the Sequence Generator transformation, and select Choose an existing Sequence object. Navigate to the data object and click OK.
    The Sequence Generator transformation appears in the mapping editor with a NEXTVAL output-only port. You can connect the NEXTVAL port to a downstream transformation or target to generate a sequence of numbers.