You can create primary or foreign key values with the Sequence Generator transformation by connecting the NEXTVAL port to a target or downstream transformation. You can use a range of values from 1 to 9,223,372,036,854,775,807 with the smallest interval of 1.
When you create primary or foreign keys, use the Cycle option to prevent the Integration Service from creating duplicate primary keys. You can do this by selecting the Truncate Target Table option in the session properties or by creating composite keys.
To create a composite key, you can configure the Integration Service to cycle through a smaller set of values. For example, if three stores generate order numbers, configure a Sequence Generator transformation to cycle through values from 1 to 3, incrementing by 1. When you connect the ORDER_NO port to the Sequence Generator transformation, the generated values create unique composite keys.
The following example shows composite keys and order numbers: