Type 1: Overwrite
With Type 1, the old attribute value in the dimension row is directly overwritten with the new value. The attribute always reflects the most recent assignment, meaning this technique intentionally destroys historical context.
While this approach is easy to implement and avoids adding new rows, it comes with a major caveat: history is restated. If you use a Type 1 attribute to group or filter historical data, past events will look as if the new value was always true. Furthermore, you must also ensure that any downstream aggregate tables, OLAP cubes and materialized views affected by this change are recomputed.
Example (Type 1)
A product manager decides to move the "Smartwatch Pro" from the Accessories department to the Wearables department. With Type 1, we simply overwrite the old department in the existing row.
Before the change:
| product_key | sku | product_name | department (Type 1) |
|---|---|---|---|
| 8801 | SW-P-01 | Smartwatch Pro | Accessories |
After the change:
| product_key | sku | product_name | department (Type 1) |
|---|---|---|---|
| 8801 | SW-P-01 | Smartwatch Pro | Wearables |
Notice what did not change: product_key is still 8801, so every existing fact row keeps pointing at this same product. No fact updates are needed - that is what makes Type 1 cheap.
The trade-off is that past Accessories sales are now understated and Wearables sales are overstated for those same periods. A report run last month and rerun today will show different department totals, with nothing in the warehouse explaining why. There is also no timestamp, so the warehouse can't answer "when" the department changed.
When to use Type 1
- Error Corrections: Overwriting typos or bad data entry. The old value was never true, so there is nothing to preserve. This applies even to attributes that are logically Type 0 - a wrongly entered date of birth is still corrected in place.
- Current-State Only Attributes: Attributes where the business strictly does not care about past values or where restating history is the explicitly desired outcome. Examples include
phone_number,email_address,preferred_languageetc.
