# SCD Type 1

> A slowly changing dimension of Type 1 keeps only the latest value of each attribute and overwrites the old value in place.

A slowly changing dimension of Type 1 keeps only the latest value of each attribute. When a value changes, the row is updated in place and the old value is lost. It is simpler and smaller than [Type 2](https://emolysis.com/glossary/scd-type-2), and the right choice when history does not matter, such as fixing a misspelled name.

For example, a customer dimension holds a row for customer 42 with the email `old@example.com`. The customer changes their email, and the next load sees `new@example.com`. With Type 1, the pipeline updates customer 42's row in place, and from then on every report shows the new email, including reports about orders placed years ago. Nothing records that the email was ever different.

That is the right behavior for corrections and for attributes whose history nobody needs: fixing a typo in a name, filling in a missing phone number or updating a product description. It is the wrong behavior when reports should reflect the value at the time of each fact, such as the sales region a customer belonged to when they ordered. Overwriting the region moves past sales to the new region and changes last year's regional totals.

Type 1 is usually implemented as a [merge](https://emolysis.com/glossary/merge-upsert) on the [natural key](https://emolysis.com/glossary/natural-key): update when the key exists and a value differs, insert when it does not. Comparing a hash of the tracked columns avoids rewriting rows that did not change. Besides Type 2, which adds a row per change, there is Type 3, which keeps the previous value in an extra column. See also [deduplication](https://emolysis.com/glossary/deduplication).

On Databricks, a Type 1 update is a `MERGE INTO` on a Delta table; on Snowflake, a `MERGE` statement, often fed by a stream of changed rows. Either way, the dimension keeps one row per key, which keeps joins simple and the table small. See also [SCD Type 2](https://emolysis.com/glossary/scd-type-2) and [dimension](https://emolysis.com/glossary/dimension).

Many dimensions mix both: some columns tracked with history, others overwritten. Emolysis's [SCD Type 2 shape](https://emolysis.com/shapes/scd2) lets you mark which columns keep history and which are simply updated, so one [dimension](https://emolysis.com/glossary/dimension) can use both approaches.

---

Page: https://emolysis.com/glossary/scd-type-1. Emolysis is a product of Bandpey GmbH, Munich, Germany. It is in private development, and nothing is released yet.
