diff --git a/website/docs/docs/build/unit-tests.md b/website/docs/docs/build/unit-tests.md index 7156ff3bc48..9b0c4b83575 100644 --- a/website/docs/docs/build/unit-tests.md +++ b/website/docs/docs/build/unit-tests.md @@ -22,8 +22,9 @@ Now, we are introducing a new type of test to dbt - unit tests. In software prog ## Before you begin - We currently only support unit testing SQL models. -- We currently don't support unit testing models that use recursive SQL. - We currently only support adding unit tests to models in your _current_ project. +- We currently *don't* support unit testing models that use recursive SQL. +- You must specify all fields in a BigQuery STRUCT in a unit test. You cannot use only a subset of fields in a STRUCT. - If your model has multiple versions, by default the unit test will run on *all* versions of your model. Read [unit testing versioned models](#unit-testing-versioned-models) for more information. - Unit tests must be defined in a YML file in your `models/` directory. diff --git a/website/docs/reference/resource-properties/data-types.md b/website/docs/reference/resource-properties/data-types.md index 1adc4e3f502..6cea501208d 100644 --- a/website/docs/reference/resource-properties/data-types.md +++ b/website/docs/reference/resource-properties/data-types.md @@ -64,6 +64,9 @@ unit_tests: struct_field: 'struct("Isha" as name, 22 as age)' struct_of_struct_field: 'struct(struct(1 as id, "blue" as color) as my_struct)' struct_array_field: ['struct(st_geogpoint(75, 45) as my_point)', 'struct(st_geogpoint(75, 35) as my_point)'] + # Make sure to include all the fields in a BigQuery `struct` within the unit test. + # It's not currently possible to use only a subset of columns in a 'struct' + ```