ACCEPTED_VALUES
functionsupportedGovernance (policies, tags, data quality)Enterprise+Returns the number of records where the value of a column does not match a Boolean expression. Data Quality Monitoring requires Enterprise Edition. To inquire about upgrading, please contact Snowflake Support.
Syntax
SNOWFLAKE.CORE.ACCEPTED_VALUES ON ( <column>, <lambda-expression> )
Parameters
| Name | Required | Description |
|---|---|---|
column | required | Specifies the column that contains values that are compared to the Boolean expression in lambda-expression. |
lambda-expression | required | Specifies a lambda expression consisting of the following syntax: column -> expression. The function returns the number of records where the value of column doesn’t match the Boolean expression. This expression can use the following operations and functions: Comparison operators Logical operators [ NOT ] LIKE [ NOT ] IN IS [ NOT ] NULL The column in the lambda expression always matches the column argument. |
Returns
The function returns a NUMBER value.
Usage notes
- You can’t call this function directly. To learn how to associate the function with a table or view so it runs at regular intervals, see Associate a DMF. You can use the SYSTEM$DATA_METRIC_SCAN function to run the ACCEPTED_VALUES function against a table without associating it.
- You cannot associate this function with the same column more than once.
- Renaming a column that is specified in the ACCEPTED_VALUES function breaks the association between the function and the column’s table or view. If you rename the column, you must re-associate the function with the table or view.
Allowed data types
The column specified in the column and lambda-expression arguments can contain any of the following data types: - DATE - FLOAT - NUMBER - TIMESTAMP_LTZ - TIMESTAMP_NTZ - TIMESTAMP_TZ - VARCHAR