From c761ee9f20aa099c995fa1f1ab2fb3243455cb9c Mon Sep 17 00:00:00 2001 From: NoyaOffer Date: Thu, 10 Sep 2026 14:43:05 +0300 Subject: [PATCH] docs: document BigQuery nested STRUCT support in anomaly tests column_anomalies and dimension_anomalies can now reference nested STRUCT leaf fields by dotted path on BigQuery (e.g. user.address.city), shipped in dbt package v0.26.0 (#1012). Add a shared note to the column and dimension anomaly test pages, plus a tailored note on all_columns_anomalies (which does not auto-expand nested STRUCTs). REPEATED/array ancestors are called out as unsupported. Co-Authored-By: Claude Opus 4.8 --- .../anomaly-detection-tests/all-columns-anomalies.mdx | 4 ++++ docs/data-tests/anomaly-detection-tests/column-anomalies.mdx | 3 +++ .../anomaly-detection-tests/dimension-anomalies.mdx | 3 +++ .../snippets/data-tests/bigquery-nested-struct-anomalies.mdx | 5 +++++ 4 files changed, 15 insertions(+) create mode 100644 docs/snippets/data-tests/bigquery-nested-struct-anomalies.mdx diff --git a/docs/data-tests/anomaly-detection-tests/all-columns-anomalies.mdx b/docs/data-tests/anomaly-detection-tests/all-columns-anomalies.mdx index 3aadbb9a3..4bf7b0ebe 100644 --- a/docs/data-tests/anomaly-detection-tests/all-columns-anomalies.mdx +++ b/docs/data-tests/anomaly-detection-tests/all-columns-anomalies.mdx @@ -18,6 +18,10 @@ Specific monitors are detailed in the table below and can be configured using th The test checks the data type of each column and only executes monitors that are relevant to it. You can use `column_anomalies` param to override the default monitors, and `exclude_prefix` / `exclude_regexp` to exclude columns from the test. + + **BigQuery: nested STRUCT fields.** `all_columns_anomalies` monitors top-level columns and does not automatically expand nested STRUCT fields. To monitor a nested field, add a [`column_anomalies`](/data-tests/anomaly-detection-tests/column-anomalies) test that references it by its dotted path, for example `user.address.city`. Fields under a `REPEATED` (array) ancestor are not supported. + + ### Test configuration diff --git a/docs/data-tests/anomaly-detection-tests/column-anomalies.mdx b/docs/data-tests/anomaly-detection-tests/column-anomalies.mdx index b352ae037..b60d74264 100644 --- a/docs/data-tests/anomaly-detection-tests/column-anomalies.mdx +++ b/docs/data-tests/anomaly-detection-tests/column-anomalies.mdx @@ -5,6 +5,7 @@ sidebarTitle: "Column anomalies" import AiGenerateTest from '/snippets/ai-generate-test.mdx'; import ColumnMetrics from '/snippets/column-metrics.mdx'; +import BigQueryNestedStruct from '/snippets/data-tests/bigquery-nested-struct-anomalies.mdx'; @@ -16,6 +17,8 @@ Specific monitors are detailed in the table below and can be configured using th The test checks the data type of the column and only executes monitors that are relevant to it. + + ### Test configuration diff --git a/docs/data-tests/anomaly-detection-tests/dimension-anomalies.mdx b/docs/data-tests/anomaly-detection-tests/dimension-anomalies.mdx index b5e8eb3e6..cc7b3c8a8 100644 --- a/docs/data-tests/anomaly-detection-tests/dimension-anomalies.mdx +++ b/docs/data-tests/anomaly-detection-tests/dimension-anomalies.mdx @@ -4,6 +4,7 @@ title: "dimension_anomalies" --- import AiGenerateTest from '/snippets/ai-generate-test.mdx'; +import BigQueryNestedStruct from '/snippets/data-tests/bigquery-nested-struct-anomalies.mdx'; @@ -13,6 +14,8 @@ import AiGenerateTest from '/snippets/ai-generate-test.mdx'; The test counts rows grouped by given `dimensions` (columns/expressions). + + This test practically monitors the frequency of values in the configured dimension over time, and alerts on unexpected changes in the distribution. It is best to configure it on low-cardinality fields. diff --git a/docs/snippets/data-tests/bigquery-nested-struct-anomalies.mdx b/docs/snippets/data-tests/bigquery-nested-struct-anomalies.mdx new file mode 100644 index 000000000..925d9ff66 --- /dev/null +++ b/docs/snippets/data-tests/bigquery-nested-struct-anomalies.mdx @@ -0,0 +1,5 @@ + + **BigQuery: nested STRUCT fields.** On BigQuery you can reference nested STRUCT leaf fields by their dotted path, for example `user.address.city`, wherever you name a column or dimension in this test. There is no need to flatten them into their own columns first, and the full dotted path is preserved in alerts. + + Fields under a `REPEATED` (array) ancestor are not supported. +