To generate surrogate keys, add a Surrogate Key Generator stage to a job with a single
output link to another stage.
About this task
If you want to pass input columns to the next stage in the job, the Surrogate Key Generator stage
can also have an input link.
Procedure
- Open the Surrogate Key Generator details pane.
- On the Stage tab, in the Properties
section, define the stage properties:
- Select the source type.
- Specify a source name in the Source name field.
- Type a name for the surrogate key column in the Generated output column
name property.
- Specify how keys are generated:
- To generate keys in sequence from the highest value that was last used, set the
Generate key from last highest value property to Yes. Any gaps
in the keyrange are ignored.
- To specify a value to initialize the key source, add the File Initial Value
property to the Additional properties (optional) group, and specify the start
value for key generation.
- If there is no input link, add the Number of Records property to
the Additional properties (optional) group, and specify how many records to
generate.
- Optional: In the Advanced section, change the
processing settings for the stage.
- Optional: If the stage has an input link, on the Input
tab, define the input data:
- In the Partitioning section, change the partition settings for the input
link.
- In the Columns section, configure columns as
needed.
- On the Advanced tab, change the buffer settings for the input link.
- On the Output tab, define the output data:
- If the stage has an input link, you can map input columns to the output link by
opening the Columns section and clicking
Edit.
- Optional: On the Advanced tab, change the buffer settings for the output
link.
- Click Save to save your changes and to close the Surrogate Key
Generator details pane.