UNSET TAG
Applies to: Databricks SQL
Databricks Runtime 16.1 and above
Removes a tag on a catalog, schema, table, view, volume, column, function, or external metadata object.
Removing tags from external metadata objects is in Public Preview and requires Databricks Runtime 18.2 or above.
To remove tags from Unity Catalog securable objects, you must own the object or have all of the following privileges:
APPLY TAGon the objectUSE SCHEMAon the object's parent schemaUSE CATALOGon the object's parent catalog
External metadata objects are not contained in a catalog or schema, so USE CATALOG and USE SCHEMA do not apply.
Syntax
UNSET TAG ON
{ CATALOG catalog_name |
COLUMN relation_name . column_name |
EXTERNAL METADATA external_metadata_name |
{ FUNCTION | PROCEDURE } function_name |
{ SCHEMA | DATABASE } schema_name |
TABLE relation_name |
VIEW relation_name |
VOLUME volume_name }
tag_key
Parameters
-
CATALOG catalog_name
The name of the catalog from which to remove the tag.
-
COLUMN relation_name . column_name
The qualified name of the column from which to remove the tag.
relation_namemust identify a view or a table. Therelation_namemust not include a temporal specification or options specification. -
EXTERNAL METADATA external_metadata_name
The name of the external metadata object from which to remove the tag.
-
{ FUNCTION | PROCEDURE }function_nameThe name of the function or procedure from which to remove the tag.
-
SCHEMA schema_name
The name of the schema from which to remove the tag.
-
TABLE relation_name
The name of the table, or view from which to remove the tag. The name must not include a temporal specification or options specification.
-
VIEW relation_name
The name of the view from which to remove the tag.
-
VOLUME volume_name
The name of the volume from which to remove the tag.
-
tag_key
An identifier. If the tag cannot be found an exception is raised.
Examples
> SET TAG ON CATALOG catalog `cost_center` = `hr`;
> UNSET TAG ON CATALOG catalog cost_center;
> SET TAG ON TABLE catalog.schema.table cost_center = hr;
> UNSET TAG ON TABLE catalog.schema.table cost_center;
> SET TAG ON COLUMN table.ssn pii;
> UNSET TAG ON COLUMN table.ssn pii;
> SET TAG ON FUNCTION catalog.schema.my_func cost_center = hr;
> UNSET TAG ON FUNCTION catalog.schema.my_func cost_center;