Skip to content

Commit

Permalink
Update website/docs/terms/primary-key.md
Browse files Browse the repository at this point in the history
Co-authored-by: Grace Goheen <[email protected]>
  • Loading branch information
matthewshaver and graciegoheen authored Dec 7, 2023
1 parent 97ccd64 commit c11032e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/docs/terms/primary-key.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ If you don't have a field in your table that would act as a natural primary key,
If your data warehouse doesn’t provide out-of-the box support and enforcement for primary keys, it’s important to clearly label and put your own constraints on primary key fields. This could look like:

* **Creating a consistent naming convention for your primary keys**: You may see an `id` field or fields prefixed with `pk_` (ex. `pk_order_id`) to identify primary keys. You may also see the primary key be named as the obvious table grain (ex. In the jaffle shop’s `orders` table, the primary key is called `order_id`).
* **Adding automated [tests](/docs/build/data-tests) to your data models**: Use a data tool, such as dbt, to create not null and unique tests for your primary key fields.
* **Adding automated [data tests](/docs/build/data-tests) to your data models**: Use a data tool, such as dbt, to create not null and unique tests for your primary key fields.

## Testing primary keys

Expand Down

0 comments on commit c11032e

Please sign in to comment.