SYSTEM$TAG_VALUE_CONTAINS

functionsupportedGovernance (policies, tags, data quality)

docs.snowflake.com ↗

System functions

Returns TRUE if the specified tag on the specified object or column contains the specified string value. Returns FALSE if the value is not present or the tag is not assigned to the object. Use this function when a tag might have more than one value. SYSTEM$GET_TAG returns an error when multiple values exist. For more information, see Multi-value tags.

Syntax

SYSTEM$TAG_VALUE_CONTAINS( '<tag_name>' , '<object_name>' , '<object_domain>' , '<value>' )

Parameters

NameRequiredDescription
'tag_name'requiredThe name of the tag as a string (the key in the key-value pair).
'object_name'requiredThe name of the object as a string. For a column, use <table_name>.<column_name>.
'object_domain'requiredString that identifies the object domain, in the same sense as for SYSTEM$GET_TAG. Multi-value tags apply to tables, views, and columns, so you can typically pass one of the following values: TABLE when the tag is on a table or view. COLUMN when the tag is on a column (use <table_name>.<column_name> for object_name in that case). For every domain string the API accepts, see the object_domain argument on SYSTEM$GET_TAG.
'value'requiredThe tag value to check for as a string.

Returns

Returns a BOOLEAN: TRUE if the value is assigned to the tag on the object, FALSE otherwise.

Usage notes

See also