<?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: Adding column as StructType in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/adding-column-as-structtype/m-p/119412#M45867</link>
    <description>&lt;P&gt;To add a STRUCT column to an existing table, use the correct syntax without $ symbols, such as ALTER TABLE table_clone ADD COLUMNS (col_name1 STRUCT&amp;lt;type: STRING, values: ARRAY&amp;lt;STRING&amp;gt;&amp;gt;)&lt;/P&gt;</description>
    <pubDate>Fri, 16 May 2025 04:04:09 GMT</pubDate>
    <dc:creator>sandeepmankikar</dc:creator>
    <dc:date>2025-05-16T04:04:09Z</dc:date>
    <item>
      <title>Adding column as StructType</title>
      <link>https://community.databricks.com/t5/data-engineering/adding-column-as-structtype/m-p/6717#M2739</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just wondering, how can I add a column to an existing table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd tried the below script but giving me an error:&lt;/P&gt;&lt;P&gt;ParseException: &lt;/P&gt;&lt;P&gt;[PARSE_SYNTAX_ERROR] Syntax error at or near '&amp;lt;'(line 1, pos 121)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALTER TABLE table_clone ADD COLUMNS col_name1 STRUCT&amp;lt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------------------------------------------------^^^&lt;/P&gt;&lt;P&gt;        $type:STRING,&lt;/P&gt;&lt;P&gt;        $values:ARRAY&amp;lt;STRING&amp;gt;&lt;/P&gt;&lt;P&gt;    &amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ALTER TABLE table_clone 
ADD COLUMNS col_name1 STRUCT&amp;lt;
        $type: STRING,
        $values: ARRAY&amp;lt;STRING&amp;gt;
    &amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 06:24:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/adding-column-as-structtype/m-p/6717#M2739</guid>
      <dc:creator>Gilg</dc:creator>
      <dc:date>2023-03-31T06:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Adding column as StructType</title>
      <link>https://community.databricks.com/t5/data-engineering/adding-column-as-structtype/m-p/6718#M2740</link>
      <description>&lt;P&gt;@Gil Gonong​&amp;nbsp;:&lt;/P&gt;&lt;P&gt;In Databricks, you can add a column to an existing table using the ALTER TABLE statement in SQL. Here is an example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ALTER TABLE table_clone ADD COLUMN col_name1 STRUCT&amp;lt;
    type: STRING,
    values: ARRAY&amp;lt;STRING&amp;gt;
&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Note that you need to have the necessary privileges to modify the table. If you are not the owner of the table, you need to have been granted the ALTER privilege by the owner or an administrator.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Apr 2023 16:19:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/adding-column-as-structtype/m-p/6718#M2740</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-02T16:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Adding column as StructType</title>
      <link>https://community.databricks.com/t5/data-engineering/adding-column-as-structtype/m-p/119412#M45867</link>
      <description>&lt;P&gt;To add a STRUCT column to an existing table, use the correct syntax without $ symbols, such as ALTER TABLE table_clone ADD COLUMNS (col_name1 STRUCT&amp;lt;type: STRING, values: ARRAY&amp;lt;STRING&amp;gt;&amp;gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 04:04:09 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/adding-column-as-structtype/m-p/119412#M45867</guid>
      <dc:creator>sandeepmankikar</dc:creator>
      <dc:date>2025-05-16T04:04:09Z</dc:date>
    </item>
  </channel>
</rss>

