<classification_profile_name>!SET_TAG_MAP

Adds a JSON object to an instance of the CLASSIFICATION_PROFILE class to map user-defined tags to the SEMANTIC_CATEGORY system tag.

Syntax

<classification_profile_name>!SET_TAG_MAP( <object> )
Copy

Arguments

object

An OBJECT that maps one or more user-defined tags to the SEMANTIC_CATEGORY system tag.

'column_tag_map': [ ... ]

An array of objects that have the following key-value pairs:

'tag_name': 'string'

The fully qualified name of the tag.

For more information, see Identifier requirements.

'tag_value':'string'

The string value of the tag.

Optional: If not specified, the tag value is mapped to the recommended value in the output of SYSTEM$CLASSIFY.

'semantic_categories': [ 'category' [ , 'category' ... ] ]

A comma-separated list of categories for the SEMANTIC_CATEGORY system tag.

These values enable you to specify the tag and string value to set on a column.

Optional: If not specified, the tag is mapped to the recommended tag in the output of SYSTEM$CLASSIFY.

Returns

Returns a successful status message or an error message. For more information, see About tag mapping.

Access control requirements

A role used to execute this SQL command must have the following privileges at a minimum:

Instance role

Object

Notes

classification_profile!PRIVACY_USER

The classification profile instance.

The account role that calls this method must be granted this instance role on the classification profile. The role used to create the instance is automatically granted this instance role.

Note that operating on any object in a schema also requires the USAGE privilege on the parent database and schema.

For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

Usage notes

Calling this method does not return the object. Because of this, you can’t use method chaining to call another method on the return value of this method. Instead, call each method in a separate SQL statement.

  • If the same tag and semantic category is mapped to two different values, then the order of the objects in the column_tag_map determines the tag and string value to set on a column. Order the column_tag_map arrays from highest preference to lowest preference.

Examples

Map a single tag and its value to the my_classification_profile instance:

CALL my_classification_profile!SET_TAG_MAP(
  {
    'column_tag_map':[
      {
        'tag_name':'tag_db.sch.pii',
        'tag_value':'important',
        'semantic_categories':['NAME']
      }
    ]
  }
);
Copy