Sunday, August 14, 2011

Sequence Generator


  1. Sequence Generator

 
The SG transformation generates numeric values. We can use the SG to create unique primary key values, replace missing primary keys, or cycle through a sequential range of numbers.

 
NEXTVAL:

 
    We can use the NEXTVAL port to generate sequence numbers by connecting it to downstream transformation or target.

 
CURRVAL:

 
    CURRVAL is the NEXTVAL plus Increment By value. We typically only connect the CURRVAL port when the NEXTVAL port is already connected to a downstream transformation. When a row enters a transformation connected to the CURRVAL port, the IS passes the last created NEXTVAL value plus one.

0 comments:

Post a Comment

newer post older post Home