Databases Reference
In-Depth Information
The following display shows the Generated Key tab in the properties window for the
SCD Type 2 Loader. This tab enables you to set up surrogate key generation.
Display 12.3 Generated Key Tab
The SCD Type 2 Loader can generate the key using a simple increment algorithm, or
you can provide your own key-generation algorithm to the transformation.
How Source Data Is Loaded a Dimension Table
Source data is loaded into a dimension table as follows:
￿ Update the cross-reference table. The SCD Type 2 Loader maintains a
cross-reference table that is used to detect data changes. The cross-reference table
is loaded with a subset of data that is copied from the dimension table. The data
in the cross-reference table consists of the current (or “most recent”) rows for each
business key value. The business key is the primary key in the original source
data.
Columns in the cross-reference table consist of the business key and a second
column that contains concatenated attribute values. The concatenated attribute
values are used to detect data changes between incoming source rows and the
current rows in the dimension table.
Note: The cross-reference table can be stored as a permanent table to improve
performance. When loading the fact table, further performance improvement is
gained by using the cross-reference table, rather than the dimension table, to load
new generated keys.
￿ Detect a new business key. If the business key value in a source row is not found in
the cross-reference table, add the source row to the dimension table. Add data to
the dimension table as specified to complete the change tracking and generated
key columns. Update the cross-reference table and evaluate to the next source row.
 
Search WWH ::




Custom Search