Editing a DataStage® Slowly Changing Dimension stage
To edit a Slowly Changing Dimension (SCD) stage, you must define how the stage looks up data in the dimension table, obtains surrogate key values, updates the dimension table, and writes data to the output link.
Before you edit the SCD stage, you must edit the stages on the input links:
- In the source stage, specify the file name for the data source and define the column metadata. Verify that the source data is sorted correctly.
- In the dimension reference stage, specify the table name and connection properties for the dimension table, and define the column metadata.
After you edit the SCD stage, you must edit the stages on the output links:
- If you are updating the dimension table in the current job, specify the name and connection properties for the dimension table, set the Write method property to Upsert, and set the Upsert Mode property to Auto-generated Update & Insert. You do not need to define column metadata because the SCD stage propagates the column definitions from the dimension reference link to the dimension update link.
- If you are loading the fact table in the current job, specify the table name and connection properties for the target database, and select any write method. The column metadata is already defined by the mappings that you specified in the SCD stage.