<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Programmatically Update Table / Columns Descriptions in Unity Catalog Without Altering Table in Data Governance</title>
    <link>https://community.databricks.com/t5/data-governance/programmatically-update-table-columns-descriptions-in-unity/m-p/67818#M1790</link>
    <description>&lt;P&gt;Currently, we must re-run our DLT pipelines anytime we want to add/modify a table or column description to unity catalog.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Is this the only way to add/modify unity catalog descriptions?&lt;/LI&gt;&lt;LI&gt;Is there functionality within databricks cli / sdk that we can leverage to programmatically update table or column descriptions?&lt;/LI&gt;&lt;LI&gt;Is there an api like StatementExecutionAPI?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Is this feature on the product roadmap?&lt;/P&gt;</description>
    <pubDate>Wed, 01 May 2024 13:15:24 GMT</pubDate>
    <dc:creator>wallfacer</dc:creator>
    <dc:date>2024-05-01T13:15:24Z</dc:date>
    <item>
      <title>Programmatically Update Table / Columns Descriptions in Unity Catalog Without Altering Table</title>
      <link>https://community.databricks.com/t5/data-governance/programmatically-update-table-columns-descriptions-in-unity/m-p/67818#M1790</link>
      <description>&lt;P&gt;Currently, we must re-run our DLT pipelines anytime we want to add/modify a table or column description to unity catalog.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Is this the only way to add/modify unity catalog descriptions?&lt;/LI&gt;&lt;LI&gt;Is there functionality within databricks cli / sdk that we can leverage to programmatically update table or column descriptions?&lt;/LI&gt;&lt;LI&gt;Is there an api like StatementExecutionAPI?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Is this feature on the product roadmap?&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 13:15:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/programmatically-update-table-columns-descriptions-in-unity/m-p/67818#M1790</guid>
      <dc:creator>wallfacer</dc:creator>
      <dc:date>2024-05-01T13:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically Update Table / Columns Descriptions in Unity Catalog Without Altering Table</title>
      <link>https://community.databricks.com/t5/data-governance/programmatically-update-table-columns-descriptions-in-unity/m-p/83254#M2011</link>
      <description>&lt;P&gt;Comments for &lt;STRONG&gt;schemas&lt;/STRONG&gt; and &lt;STRONG&gt;tables&lt;/STRONG&gt; may be updated using SQL DDL statement&amp;nbsp;&amp;nbsp;&lt;A href="https://docs.databricks.com/en/sql/language-manual/sql-ref-syntax-ddl-comment.html" target="_self"&gt;COMMENT ON&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Comments for &lt;STRONG&gt;columns&lt;/STRONG&gt; are updated using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;ALTER TABLE &amp;lt;table-name&amp;gt; ALTER COLUMN &amp;lt;column-name&amp;gt; COMMENT '&amp;lt;comment-text&amp;gt;';&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The &amp;lt;column-name&amp;gt; for nested STRUCTS follows simple dotted notation. For example, a STRUCT for a person's physical address:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;ALTER TABLE person ALTER COLUMN physical_address.postal_code
COMMENT 'Postal code for the person\'s physical address.';&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Less obvious, the &amp;lt;column-name&amp;gt; for fields in ARRAY&amp;lt;STRUCT&amp;lt;&amp;gt;&amp;gt; requires additional keyword ".element". For example, an array of address STRUCTs that includes an "address use code" field:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;ALTER TABLE person ALTER COLUMN address.element.use_code
COMMENT 'The address use code indicates either \'physical\' or \'mailing\' address.';&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As of this writing, each ALTER COLUMN ... COMMENT requires an individual ALTER TABLE statement. The column comments cannot be chained together as a list of as clauses within ALTER TABLE.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 17:29:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-governance/programmatically-update-table-columns-descriptions-in-unity/m-p/83254#M2011</guid>
      <dc:creator>MichaelP</dc:creator>
      <dc:date>2024-08-16T17:29:13Z</dc:date>
    </item>
  </channel>
</rss>

