SET TAG

Assigns a tag with a value to a table, view, or column. Columns use 4-part naming: zone.schema.table.column.

Category: catalogDeltaForge extension

Syntax

SET TAG <tag_name> = '<value>' ON TABLE|VIEW|COLUMN <object_name>

Description

## Overview Assigns a tag-value pair to a catalog object (table, view, or column). Tags provide governance metadata for classification, compliance, ownership tracking, and data discovery. Each object can carry multiple tag assignments, and each tag can be assigned to multiple objects. ## Behavior - The tag must be defined via CREATE TAG before it can be assigned. If the tag does not exist, the command fails. - If the tag definition includes ALLOWED VALUES, the specified value must match one of the permitted entries. Otherwise, the command fails with a validation error. - If the tag is already assigned to the specified object, the value is updated (overwritten) rather than creating a duplicate. - If the tag was created with PROPAGATE enabled and is assigned to a table, the assignment automatically cascades to all columns of that table. - Column references require four-part naming: zone.schema.table.column. - The command routes through the control plane catalog API. A valid catalog router connection is required. ## Compatibility SET TAG is a DeltaForge extension for attaching governance metadata to catalog objects. It follows the tag-value model used in enterprise data catalog systems.

Examples

-- Tag a table with PII classification
SET TAG pii_type = 'email' ON TABLE gold.customer.emails;
-- Tag a view with an environment label
SET TAG environment = 'production' ON VIEW gold.analytics.daily_metrics;
-- Tag a specific column as containing sensitive data
SET TAG pii_type = 'ssn' ON COLUMN gold.customer.users.social_security_number;
-- Apply multiple tags to the same table
SET TAG data_domain = 'finance' ON TABLE gold.finance.transactions;
SET TAG sensitivity = 'confidential' ON TABLE gold.finance.transactions;
SET TAG data_owner = 'finance_team' ON TABLE gold.finance.transactions;

Pitfalls

See Also

Open in interactive docs →   DeltaForge home →