Steps to Create a Type 2 Dimension/Flag Current Mapping
Steps to Create a Type 2 Dimension/Flag Current Mapping
To create a Type 2 Dimension/Flag Current mapping:
In the Mapping Designer, click Mappings > Wizards > Slowly Changing Dimensions.
Enter a mapping name and select Type 2 Dimension. Click Next.
The naming convention for mappings is m_
MappingName
.
Select a source definition to be used by the mapping.
All available source definitions appear in the Select Source Table list. This list includes shortcuts, flat file, relational, and Application sources.
Enter a name for the mapping target table. Click Next.
The naming convention for target definitions is T_
TARGET_NAME
.
Select the column or columns you want to use as a lookup condition from the Target Table Fields list and click Add.
The wizard adds selected columns to the Logical Key Fields list.
The columns you select should be a key column in the source.
When you run the session, the Integration Service performs a lookup on existing target data. The Integration Service returns target data when Logical Key Fields columns match corresponding target columns.
To remove a column from Logical Key Fields, select the column and click Remove.
Select the column or columns you want the Integration Service to compare for changes, and click Add.
The wizard adds selected columns to the Fields to Compare for Changes list.
When you run the session, the Integration Service compares the columns in the Fields to Compare for Changes list between source rows and the corresponding target (lookup) rows. If the Integration Service detects a change, it marks the row changed.
To remove a column from the list, select the column and click Remove.
Click Next. Select Mark the ‘Current’ Dimension Record with a Flag.
Click Finish.
The new mapping appears in the workspace. Make the necessary edits to the mappings.
In the Type 2 Dimension/Flag Current mapping, the Designer uses three instances of the same target definition to enable the three separate data flows to write to the same target table. Generate only one target table in the target database.