You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -536,7 +536,14 @@ We generally recommend testing this uniqueness condition by either:
536
536
537
537
- generating a [surrogate_key](#generate_surrogate_key-source) for your model and testing
538
538
the uniqueness of said key, OR
539
-
- passing the `unique` test a concatenation of the columns (as discussed [here](https://docs.getdbt.com/docs/building-a-dbt-project/testing-and-documentation/testing/#testing-expressions)).
539
+
- passing the `unique` test a concatenation of the columns:
540
+
```yaml
541
+
models:
542
+
- name: revenue_by_product_by_month
543
+
tests:
544
+
- unique:
545
+
column_name: "month || '-' || product"
546
+
```
540
547
541
548
However, these approaches can become non-perfomant on large data sets, in which
0 commit comments