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. +