The Surrogate Key Transform adds a unique identifier column to source data. You can add the output column name, set the seed and increment of the output column generated by the surrogate key transform.
Output Column Name
The output column name is used to define the name of the surrogate key column that's included in the transform when executed.
Reset counter after each run
This option adds a surrogate key value to the data flow that starts at the seed value and increments based on the increment value.
Save Counter to database after each run
This option allows you to save the surrogate key value to a table in your database after each run. Choosing this option enables a few more options you must configure under the Database Options section.
The seed property is used to define the starting point for the surrogate key data. You can define the seed two ways:
Text - The surrogate key data starts with the number entered into the textbox.
Variable - The surrogate key data starts with the value from the selected variable.
The increment property is used to define the increment of the surrogate key data. You can define the increment two ways:
Text - The surrogate key data increments with the number entered into the textbox.
Variable - The surrogate key data increments with the value from the variable selected.
Sets the maximum number the surrogate key can have. If you set it higher than the default, the output column that contains the surrogate key value is set to a DT_I8 value.
Recycle Max Value
If selected, this option rests the value of the surrogate key value to the Seed value when the max value is reached. If unselected, the transform fails with an error stating the max value has been reached.
Select the connection manager that contains the table which stores the surrogate key values.
Table for counter storage
If the table is already created, enter that table name here. If you are creating a new one, enter the desired name for the table here and then select create table.
Create Table button
Selecting this button attempts to make a table using the specified name. Selecting the button opens a message that displays the SQL statement used to create the table.