How many records will be created in a dimension table when an employee moved from location X to location Y and then to Z from Y?

1 comment:

  1. The number of Dimention records depends upon the type of the dimention table.
    If the dimention is of SCD Type1 : Then only 1 record will exist which indicates the location of the Employee is Z

    If it is of SCD type2: then 4 records will exist

    Employee details

    Emp_SK_id | EMP_id | Emp_Name | Location | Eff_From_Date | Eff_To_Date

    1 | 545 | ABC | X | 01-01-2000 | 31-12-2001
    2 | 545 | ABC | Y | 01-01-2002 | 31-12-2002
    3 | 545 | ABC | Z | 01-01-2003 | 99-99-9999

    Here the last record is the current and latest as the Eff_To_Date > Current Date

    ReplyDelete