cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Column level tags creation in views via SQL

souravroy1990
New Contributor

Hi,

I'm trying to run this query using SQL and using DBR 17.3 cluster. But I get a syntax error.

 

ALTER VIEW catalog.schema.view

ALTER COLUMN column_name

SET TAGS (`METADATA` = `xyz`);

 

But below query works-

 

SET TAG ON COLUMN catalog.schema.view.column_name

`METADATA` = `xyz`;

 

Is the first format not supported in databricks SQL or there is any problem with the syntax.

 

1 REPLY 1

szymon_dybczak
Esteemed Contributor III

Hi @souravroy1990 ,

This syntax is just unsupported. Using ALTER VIEW you can set tag for an entire view:

szymon_dybczak_0-1769088068471.png

If you need to set tag on a column you've already found a proper way which is to use SET TAG command:

SET TAG - Azure Databricks - Databricks SQL | Microsoft Learn