ACCEPTED_VALUES_PERCENT

functionsupportedGovernance (policies, tags, data quality)Enterprise+

docs.snowflake.com ↗

Data metric functions

Returns the percentage of records where the value of a column does not match a Boolean expression. To get the number of those records instead, use ACCEPTED_VALUES (system data metric function). Data Quality Monitoring requires Enterprise Edition. To inquire about upgrading, please contact Snowflake Support.

Syntax

SNOWFLAKE.CORE.ACCEPTED_VALUES_PERCENT ON ( <column>, <lambda-expression> )

Parameters

NameRequiredDescription
columnrequiredSpecifies the column that contains values that are compared to the Boolean expression in lambda-expression.
lambda-expressionrequiredSpecifies a lambda expression consisting of the following syntax: column -> expression. The function returns the percentage 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 FLOAT value between 0 and 100: the percentage of records in scope where the value of the column doesn’t match the Boolean expression. A value of 0 means that no record in scope fails the Boolean expression. The records in scope are all records in the table or view. If you associate the function with a FILTER clause, they are the records that satisfy the filter. If you associate the function with a WITHIN GROUP clause, they are the records in each group. The function returns NULL if no records are in scope.

Usage notes

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