Specifying information about a key source in the DataStage® Slowly Changing Dimension stage
If you created a key source with a Surrogate Key Generator stage, you must specify how the Slowly Changing Dimension (SCD) stage uses the source to generate surrogate keys.
The key source can be a flat file or a database sequence. The key source must exist before the job runs. If the key source is a flat file, the file must be accessible from all nodes that run the SCD stage.
- On the Input tab, select the reference link in the Input name field.
- Open the Surrogate Key section.
- In the Source type field, select the source type.
Calls to the key source are made by the NextSurrogateKey function. In the output
columns table, create a derivation that uses the NextSurrogateKey function for the column that has a
purpose code of Surrogate Key. The NextSurrogateKey function returns the value of the next surrogate
key when the SCD stage creates a new dimension row.