<?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 Re: How to escape column comments when adding them programmatically in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/how-to-escape-column-comments-when-adding-them-programmatically/m-p/72146#M7415</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/37890"&gt;@JameDavi_51481&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I do not believe this is supported currently, please see this line in the Parameter Marker documentation:&lt;/P&gt;
&lt;P&gt;&amp;gt; &lt;EM&gt;You must not reference a parameter marker in a DDL statement...&lt;BR /&gt;&lt;/EM&gt;Ref:&amp;nbsp;&lt;A href="https://docs.databricks.com/en/sql/language-manual/sql-ref-parameter-marker.html#parameter-markers" target="_blank"&gt;https://docs.databricks.com/en/sql/language-manual/sql-ref-parameter-marker.html#parameter-markers&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Another consideration for you would be to manage the 'state' of your table (and table comments) using Terraform instead of a YAML file. Here's the documentation for the `databricks_sql_table` resource: &lt;BR /&gt;&lt;A href="https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_table" target="_blank"&gt;https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_table&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Alternatively, please do feel free to request this as a new feature at &lt;A href="https://ideas.databricks.com" target="_blank"&gt;https://ideas.databricks.com&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hope it helps.&lt;/P&gt;</description>
    <pubDate>Sat, 08 Jun 2024 20:24:16 GMT</pubDate>
    <dc:creator>brockb</dc:creator>
    <dc:date>2024-06-08T20:24:16Z</dc:date>
    <item>
      <title>How to escape column comments when adding them programmatically</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-escape-column-comments-when-adding-them-programmatically/m-p/71932#M7414</link>
      <description>&lt;P&gt;I would like to add comments to all of our columns, programmatically. The only way I can find to do this is through SQL DDL - e.g. `alter table sometable alter column somecolumn comment 'some comment string`. However, I want to read this comment string from a YAML file, and protect against SQL injection. I cannot find a way to do this - if I use `alter table sometable alter column somecolumn comment :placeholder` I get a syntax error on the colon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that e.g. special characters like single quotes work in comments, because I can edit and apply them manually - but it's not obvious how to do this with DDL when updating a table programmatically.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2024 17:08:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-escape-column-comments-when-adding-them-programmatically/m-p/71932#M7414</guid>
      <dc:creator>JameDavi_51481</dc:creator>
      <dc:date>2024-06-06T17:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to escape column comments when adding them programmatically</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-escape-column-comments-when-adding-them-programmatically/m-p/72146#M7415</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/37890"&gt;@JameDavi_51481&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I do not believe this is supported currently, please see this line in the Parameter Marker documentation:&lt;/P&gt;
&lt;P&gt;&amp;gt; &lt;EM&gt;You must not reference a parameter marker in a DDL statement...&lt;BR /&gt;&lt;/EM&gt;Ref:&amp;nbsp;&lt;A href="https://docs.databricks.com/en/sql/language-manual/sql-ref-parameter-marker.html#parameter-markers" target="_blank"&gt;https://docs.databricks.com/en/sql/language-manual/sql-ref-parameter-marker.html#parameter-markers&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Another consideration for you would be to manage the 'state' of your table (and table comments) using Terraform instead of a YAML file. Here's the documentation for the `databricks_sql_table` resource: &lt;BR /&gt;&lt;A href="https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_table" target="_blank"&gt;https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/sql_table&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Alternatively, please do feel free to request this as a new feature at &lt;A href="https://ideas.databricks.com" target="_blank"&gt;https://ideas.databricks.com&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hope it helps.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jun 2024 20:24:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-escape-column-comments-when-adding-them-programmatically/m-p/72146#M7415</guid>
      <dc:creator>brockb</dc:creator>
      <dc:date>2024-06-08T20:24:16Z</dc:date>
    </item>
  </channel>
</rss>

