Type 1: Overwrite Old Value
Type 1 is the rule from the previous section, applied on purpose. When a source value changes, the load updates the dimension row in place and discards the old value. The table keeps one row per entity, the surrogate key stays the same, and no fact row is touched.
UPDATE dim_host
SET host_name = 'Aiko Tanaka'
WHERE host_id = 6102Read one row of a Type 1 dimension as: this host, as the business knows them right now. That meaning covers every column in the row. A report that joins to it describes all of history using today's values, a style called as-is reporting.
Where overwriting is the right answer
Type 1 fits when
- The old value was never true: A typo, a wrong birth year, a city entered by mistake. Old facts should show the fixed value, and restating past reports is the goal.
- No report groups or filters by it: Email, phone number, profile photo. These are read for their current value and never used to slice revenue.
- The business wants history under today's labels: A product team asks how the hosts who are Superhosts today performed over the last 3 years. Applying today's tier to every old booking is the point.
The third case shows that Type 1 is a reporting choice as much as a storage shortcut. The same tier column can be right to overwrite for one audience and wrong for another. What decides it is the question the report answers: how did these entities perform, or what was true when each event happened.
The cost of overwriting
Type 1 is the cheapest rule to run. The load compares incoming values with stored ones and updates the rows that differ. The dimension's row count equals the number of entities, so joins stay small and counting hosts is COUNT(*).
The cost arrives later, in other tables. Any table computed from the old value keeps showing it until rebuilt. Suppose a nightly aggregate, agg_revenue_by_city, holds 900 of revenue under Osaka from host 6102's bookings. Support then learns she hosts in Kyoto and corrects city with a Type 1 update. The dimension says Kyoto, the aggregate still says Osaka, and a dashboard reading the aggregate disagrees with a query on the star. A Type 1 change to any column that aggregates group by has to trigger a rebuild of those aggregates across their full history.
The other cost is trust. For a display field, nobody notices an overwrite. For a column that feeds finance or compensation, an unexplained restatement of a closed month becomes an incident.
- Do
- Use Type 1 for corrections, where the old value was never true.
- Rebuild every aggregate grouped by a column after overwriting it.
- Record which columns are Type 1 in the table's documentation.
- Avoid
- Overwrite a column that finance, billing or commission reports group by.
- Assume history is safe because the fact table was left untouched.
- Pick Type 1 for a tracked attribute because the load is shorter to write.
A host dimension has these 4 columns. Which one should the load overwrite with Type 1?
- tier, which sets the commission rate charged on each booking.
- country, which the tax team uses to report yearly revenue by country.
- cancellation_policy, which analysts use to compare refund rates by policy.
- payout_email, which the payments job reads to send each host's next payout.
Type 1 keeps the dimension small and the load short, and it gives up the past. When a past value has to survive, the table needs somewhere to keep it, and the roomiest place is a second row.
About this lesson
This section is part of the Change Tracking lesson on DataDriven, the home of data engineering. Lessons cover SQL, Python, Spark, data modeling and pipeline architecture, and each section pairs its explanation with worked examples and practice you run as you go.