User Guide > Data Generation Techniques and Parameters > Sequence Generation
  

Sequence Generation

A sequence generation rule is a global or ad hoc rule that generates numeric and date values in a sequence.
You select a beginning value and an increment value when you create a sequence generation rule.
When you create a sequence generation rule for a numeric data type, you can choose to start the sequence from the last output value. When you run the plan again, the sequence continues to generate numbers from the previous output value
If you try to generate numbers in a column with string data type and if you choose to start the sequence from the last value, TDM generates values from the beginning when you run the plan again.
The following image shows the sequence generation parameters:
The New Generation Rule dialog box shows the sequence generation parameters for the numeric data type. The sequence generation parameters are start value, increment value, null values, and invalid values.

Sequence Generation Example

You want to generate ticket numbers in ascending order. The target table has a TICKET_NUMBER column. You create a sequence generation rule with the numeric data type. You enter a start value of 1000 and an increment value of one (1).

Date Sequence Generation Parameters

Create sequence generation rule for date data types.
The following table describes the parameters that you can configure to generate a sequence of data for date data type:
Parameter
Description
Start Date
The date at which you can start generation of sequence data for date data types.
Increment by
The value to increment after the start date. You can enter a number and select year, month, day, hour, minutes, or seconds.
Null Values
A list of global rules or default rule that are available for the date data type. A null value is a value that a default rule or a global rule generates in the target column for the date data types.
Invalid Values
A list of global rules or default rule that are available for the date data type. Any value that is less than the sequence start value for a positive increment or more than the sequence start value for a negative increment is not valid.

Numeric Sequence Generation Parameters

Create sequence generation rule for numeric data types.
The following table describes the parameters that you can configure to generate a sequence of data for numeric data type:
Parameter
Description
Start Value
The minimum value to start generation of a sequence. You can enter a number to generate the sequence data.
Increment Value
The value to increment after the start value during generation of the sequence data. You can enter a number to increment the value.
Start Sequence from Last Value
Starts the sequence from the last output value when you run the plan again.
Note: If you try to generate numbers in a column with string data type and if you choose to start the sequence from the last value, TDM generates values from the beginning when you run the plan again.
Null Values
A list of global rules or default rule that are available for the numeric data type. A null value is value that a default rule or a global rule generates in the target column for the numeric data type.
Invalid Values
A list of global rules or default rule that are available for the numeric data type. Any value that is less than the sequence start value for a positive increment or more than the sequence start value for a negative increment is not valid.