TAG_REFERENCES_WITH_LINEAGE

functionsupportedGovernance (policies, tags, data quality)

docs.snowflake.com ↗

Account Usage table functionsTable functions

Returns a table in which each row displays an association between the specified tag and the Snowflake object to which the tag is associated. The associated tag and Snowflake object are the result of both a direct association to an object and tag inheritance.

Syntax

TAG_REFERENCES_WITH_LINEAGE( '<name>' )

Parameters

NameRequiredDescription
'name'requiredThe fully qualified name of the tag. The fully qualified name must specify the parent tag database and tag schema for the tag in the following format: <tag_database>.<tag_schema>.<tag_name>

Usage notes

Output

The function returns the following columns: Column | Data Type | Description TAG_DATABASE | TEXT | The database in which the tag is set. TAG_SCHEMA | TEXT | The schema in which the tag is set. TAG_ID | NUMBER | Internal/system-generated identifier for the tag. TAG_NAME | TEXT | The name of the tag. This is the key in the key = 'value' pair of the tag. TAG_VALUE | TEXT | The value of tag. This is the 'value' in the key = 'value' pair of the tag. LEVEL | TEXT | The object domain on which the tag is set. OBJECT_DATABASE | TEXT | Database name of the referenced object for database and schema objects. If the object is not a database or schema object, the value is empty. OBJECT_SCHEMA | TEXT | Schema name of the referenced object (for schema objects). If the referenced object is not a schema object (e.g. warehouse), this value is empty. OBJECT_ID | NUMBER | Internal/system-generated identifier for the object. OBJECT_NAME | TEXT | Name of the referenced object if the tag association is on the object. OBJECT_DELETED | TIMESTAMP_LTZ | Date and time when the associated object or column was dropped, or if the parent object is dropped. DOMAIN | TEXT | Domain of the reference object (e.g. table, view) if the tag association is on the object. If the tag association is on a column, the domain is COLUMN. COLUMN_ID | NUMBER | Internal/system-generated identifier for the column. COLUMN_NAME | TEXT | Name of the referenced column; not applicable if the tag association is not a column. APPLY_METHOD | TEXT | Specifies how the tag got assigned to the object. Possible values include the following: CLASSIFIED: The tag was automatically applied to a column that was classified as containing sensitive data. See label-classify_auto_map_tags. INHERITED: The object inherited the tag from an object higher up in the Snowflake securable object hierarchy. See Tag inheritance. MANUAL: Someone manually set the tag on the object using a CREATE <object> or ALTER <object> command. See label-object_tagging_set. PROPAGATED: The tag was automatically propagated from one object to another. See Automatic tag propagation with user-defined tags. NULL: Legacy record. NONE: Legacy record.