Professional Documents
Culture Documents
Sequence Generator Transformation
Sequence Generator Transformation
GENERATOR
TRANSFORMATION
The Sequence Generator transformation is a connected
transformation that generates numeric values.
It contains two output ports that you can connect to one or
more transformations.
The output ports are called as CURRVAL and NEXTVAL.
Common Uses for Sequence
Generator
Create keys.
Replace missing values.
Sequence Generator Ports
NEXTVAL
The NEXTVAL port can be used to generate sequence
numbers by connecting it to a transformation or target.
The NEXTVAL port when connected to a downstream
transformation, it generates the sequence based on the
Current Value and Increment By properties.
The NEXTVAL port can be connected to more than
one target table in a mapping to generate unique
primary key values for each target table.
The column of unique primary key values is sent to one
target table as a block of sequence numbers.
The second targets receives a block of sequence
numbers from the Sequence Generator transformation
only after the first target table receives the block of
sequence numbers
CURRVAL
CURRVAL is NEXTVAL plus the Increment By value
We will connect the CURRVAL port only when the NEXTVAL port
is already connected to a downstream transformation.
When a row enters the transformation connected to the
CURRVAL port, the Power Center Server passes the last-created
NEXTVAL value plus one.
Start Value
Increment By
End Value
Current Value
Cycle
Number of Cached Values
Reset
Tracing Level
Start Value
This value denotes the value to start the sequence with.
By default it is zero.
Cycle
Cycle option is used to generate a repeating sequence.
Increment By is the integer the Power Center Server adds to the existing
value to create the new value in the sequence. By default, the Increment By
is set to 1.
End Value
End Value is the maximum value you want the Power Center Server to
generate.
If the Power Center Server reaches this value during the session and the
sequence is not configured to cycle, it fails the session.
Current Value
The Power Center Server uses the current value as the basis for
generated values for each session.
At the end of each session, the Power Center Server updates the
current value to the last value generated for the session plus one if
the Sequence Generator Number of Cached Values is 0.
Since the Power Center Server uses the current value to determine
the first value for each session, you should only edit the current
value when you want to reset the sequence.