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:ย 

applying column tags

ashraf1395
Valued Contributor
Can anyone tell me the correct syntax for applying a column tag to a specific table
These are what I tried
 

 

 ALTER TABLE accounts_and_customer.bronze.BB1123_loans ALTER/CHANGE COLUMN loan_number SET TAGS ('classification' = 'confidential')<p>I got this error<li-code lang="markup">Column 'loan_number' not found in table accounts_and_customer.bronze.loan_number

This the error I got

Column 'loan_number' not found in table accounts_and_customer.bronze.loan_number

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

TakuyaOmi
Valued Contributor

Hi, @ashraf1395 

I tried the following code, and it worked well for me. Does this align with what youโ€™re trying to achieve?

%sql
ALTER TABLE accounts_and_customer.bronze.BB1123_loans ALTER COLUMN loan_number SET TAGS ('classification' = 'confidential');

TakuyaOmi_0-1733145906172.png

 

View solution in original post

ashraf1395
Valued Contributor

Hi there @TakuyaOmi ,
I agree. The syntax was correct. I was facing some completely different problems with schemas and I solved it. Thanks though. Or I would have spent hours banging my head to find the reason for error.

View solution in original post

2 REPLIES 2

TakuyaOmi
Valued Contributor

Hi, @ashraf1395 

I tried the following code, and it worked well for me. Does this align with what youโ€™re trying to achieve?

%sql
ALTER TABLE accounts_and_customer.bronze.BB1123_loans ALTER COLUMN loan_number SET TAGS ('classification' = 'confidential');

TakuyaOmi_0-1733145906172.png

 

ashraf1395
Valued Contributor

Hi there @TakuyaOmi ,
I agree. The syntax was correct. I was facing some completely different problems with schemas and I solved it. Thanks though. Or I would have spent hours banging my head to find the reason for error.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group