# \#surrogate-keys

**URL:** https://discourse.getdbt.com/tag/surrogate-keys/46.md

[Latest](https://discourse.getdbt.com/latest.md) · [Categories](https://discourse.getdbt.com/categories.md) · [Tags](https://discourse.getdbt.com/tags.md)

---

## [Error with generate\_surrogate\_key()](https://discourse.getdbt.com/t/error-with-generate-surrogate-key/6365)

<div class="topic-metadata">

**Author:** [@pfan](https://discourse.getdbt.com/u/pfan)\
**Replies:** 2\
**Last updated:** [February 13, 2024, 10:14am UTC](https://discourse.getdbt.com/t/error-with-generate-surrogate-key/6365 "2024-02-13T10:14:22Z")

</div>

The problem I’m having I am stuck on an error. I want to generate surrogate key but keep getting the error below. select {{ dbt\_utils.generate\_surrogate\_key( \['date', 'user\_id', 'type'\] ) }} as contr…

---

## [dbt\_utils 0.8.6 surrogate\_key](https://discourse.getdbt.com/t/dbt-utils-0-8-6-surrogate-key/7683)

<div class="topic-metadata">

**Author:** [@randy11](https://discourse.getdbt.com/u/randy11)\
**Replies:** 1\
**Last updated:** [April 5, 2023, 4:25pm UTC](https://discourse.getdbt.com/t/dbt-utils-0-8-6-surrogate-key/7683 "2023-04-05T16:25:22Z")

</div>

The problem I’m having When running dbt run with dbt\_utils at version 0.8.6. I’m currently unable to upgrade. with vendors as ( select {{ dbt\_utils.surrogate\_key(\[ 'vendor\_name', 'vendor\_address\_street…

---

## [Avoiding collisions during MD5 surrogate key creation](https://discourse.getdbt.com/t/avoiding-collisions-during-md5-surrogate-key-creation/4727)

<div class="topic-metadata">

**Author:** [@mf36](https://discourse.getdbt.com/u/mf36)\
**Replies:** 2\
**Last updated:** [August 10, 2022, 11:28pm UTC](https://discourse.getdbt.com/t/avoiding-collisions-during-md5-surrogate-key-creation/4727 "2022-08-10T23:28:13Z")

</div>

Hi all, I searched the forum but did not find a thread specific to my topic, but only closely related ones as per the following: For surrogate key creation, dbt utils implements md5 hashing \[1\] Auto incrementing has o…
