Complete the code to add a unique test on the 'id' column in a dbt model.
tests:
- [1]:
column_name: idThe unique test ensures that all values in the specified column are unique.
Complete the code to add a not_null test on the 'email' column in a dbt model.
tests:
- [1]:
column_name: emailThe not_null test ensures that no null values exist in the specified column.
Fix the error in the accepted_values test to check that 'status' only contains 'active' or 'inactive'.
tests:
- accepted_values:
column_name: status
values: [1]The values parameter must be a list of accepted strings, so it needs square brackets and quotes.
Fill both blanks to create a relationships test linking 'user_id' in this model to 'id' in the 'users' model.
tests:
- relationships:
column_name: [1]
to: ref('[2]')
field: idThe relationships test checks that values in user_id exist in the id column of the users model.
Fill all three blanks to add an accepted_values test on 'category' allowing only 'A', 'B', or 'C'.
tests:
- accepted_values:
column_name: [1]
values: [[2], [3]]The accepted_values test requires the column name and a list of allowed values. Here, 'category' is the column, and the values are 'A', 'B', and 'C'.