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

Column Tags Not Accessible in Genie (Azure Databricks)

sreya_sahithi
New Contributor

Hi Team,

Weโ€™ve applied column-level tags to a table in Azure Databricks and attached the table in our Genie workspace. However, when querying via Genie, the column tag information is not being returned correctly (missing/incomplete results), despite trying multiple prompt variations. Weโ€™ve verified that tags are correctly applied at the source.

In the above screenshot, when we query for column tags, Genie is instead returning the column count correctly, but not the tag information.Is there any limitation, configuration, or permission required for Genie to access column-level tags?

Thanks!

 

 

 

 

sreya_sahithi_2-1774591739004.png

1 ACCEPTED SOLUTION

Accepted Solutions

Ale_Armillotta
Contributor III

Hi @sreya_sahithi,

This is an important distinction about how Genie works: Genie queries the actual data rows in the tables attached to its space โ€” it does not natively query Unity Catalog metadata such as column-level tags. Column tags live in INFORMATION_SCHEMA.COLUMN_TAGS (a system metadata view), not in the table's data, so Genie won't surface them through natural language prompts against the table itself.

Why column count works but tags don't: Genie can infer the number of columns from the table schema it is given, but it has no direct path to tag metadata unless that metadata is exposed as queryable data.

Solutions:

Option 1 โ€“ Query INFORMATION_SCHEMA directly in a SQL notebook/warehouse

SELECT column_name, tag_name, tag_value
FROM <your_catalog>.information_schema.column_tags
WHERE table_schema = '<your_schema>' AND table_name = '<your_table>';

Option 2 โ€“ Create a view that exposes tag metadata as data, then add it to your Genie space

CREATE OR REPLACE VIEW <catalog>.<schema>.v_column_tags
AS SELECT table_catalog, table_schema, table_name, column_name, tag_name, tag_value
FROM <catalog>.information_schema.column_tags;

Then attach v_column_tags as an additional table in your Genie space. After that, you can ask Genie: "Show me all column tags for table X" and it will query the view correctly.

Option 3 โ€“ Use the Catalog Explorer UI For a quick inspection without SQL, navigate to Catalog โ†’ your table โ†’ Columns tab in the Databricks UI. Column tags are displayed there without any query needed.

Note on tag inheritance: Tags applied at the catalog or schema level do not automatically propagate to column-level tags, so always verify tags were applied directly at the column level using ALTER TABLE ... ALTER COLUMN ... SET TAGS.

References:

View solution in original post

1 REPLY 1

Ale_Armillotta
Contributor III

Hi @sreya_sahithi,

This is an important distinction about how Genie works: Genie queries the actual data rows in the tables attached to its space โ€” it does not natively query Unity Catalog metadata such as column-level tags. Column tags live in INFORMATION_SCHEMA.COLUMN_TAGS (a system metadata view), not in the table's data, so Genie won't surface them through natural language prompts against the table itself.

Why column count works but tags don't: Genie can infer the number of columns from the table schema it is given, but it has no direct path to tag metadata unless that metadata is exposed as queryable data.

Solutions:

Option 1 โ€“ Query INFORMATION_SCHEMA directly in a SQL notebook/warehouse

SELECT column_name, tag_name, tag_value
FROM <your_catalog>.information_schema.column_tags
WHERE table_schema = '<your_schema>' AND table_name = '<your_table>';

Option 2 โ€“ Create a view that exposes tag metadata as data, then add it to your Genie space

CREATE OR REPLACE VIEW <catalog>.<schema>.v_column_tags
AS SELECT table_catalog, table_schema, table_name, column_name, tag_name, tag_value
FROM <catalog>.information_schema.column_tags;

Then attach v_column_tags as an additional table in your Genie space. After that, you can ask Genie: "Show me all column tags for table X" and it will query the view correctly.

Option 3 โ€“ Use the Catalog Explorer UI For a quick inspection without SQL, navigate to Catalog โ†’ your table โ†’ Columns tab in the Databricks UI. Column tags are displayed there without any query needed.

Note on tag inheritance: Tags applied at the catalog or schema level do not automatically propagate to column-level tags, so always verify tags were applied directly at the column level using ALTER TABLE ... ALTER COLUMN ... SET TAGS.

References: