<?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 Trying to convert STRING column into Array of Structs in SQL statement in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/trying-to-convert-string-column-into-array-of-structs-in-sql/m-p/4199#M986</link>
    <description>&lt;P&gt;I have STRING column in a DLT table that was loaded using SQL Autoloader via a JSON file. When I use the "schema_of_json" function in a SQL statement passing in the literal string from the STRING column then I get this output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARRAY&amp;lt;STRUCT&amp;lt;firstFetchDate: STRING, lastFetchDate: STRING, matchedObjectArray: ARRAY&amp;lt;STRUCT&amp;lt;highlightSnippet: STRING, matchedObjectAPI: STRING, matchedObjectAttribute: STRING, matchedObjectId: STRING, matchedObjectName: STRING, object: STRING&amp;gt;&amp;gt;, name: STRING, normDetailsAPI: STRING, normId: STRING, object: STRING&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to figure out how to get this STRING datatype into a more structure format using a SQL statement.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2023 12:18:25 GMT</pubDate>
    <dc:creator>BamBam</dc:creator>
    <dc:date>2023-05-18T12:18:25Z</dc:date>
    <item>
      <title>Trying to convert STRING column into Array of Structs in SQL statement</title>
      <link>https://community.databricks.com/t5/data-engineering/trying-to-convert-string-column-into-array-of-structs-in-sql/m-p/4199#M986</link>
      <description>&lt;P&gt;I have STRING column in a DLT table that was loaded using SQL Autoloader via a JSON file. When I use the "schema_of_json" function in a SQL statement passing in the literal string from the STRING column then I get this output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARRAY&amp;lt;STRUCT&amp;lt;firstFetchDate: STRING, lastFetchDate: STRING, matchedObjectArray: ARRAY&amp;lt;STRUCT&amp;lt;highlightSnippet: STRING, matchedObjectAPI: STRING, matchedObjectAttribute: STRING, matchedObjectId: STRING, matchedObjectName: STRING, object: STRING&amp;gt;&amp;gt;, name: STRING, normDetailsAPI: STRING, normId: STRING, object: STRING&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to figure out how to get this STRING datatype into a more structure format using a SQL statement.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 12:18:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/trying-to-convert-string-column-into-array-of-structs-in-sql/m-p/4199#M986</guid>
      <dc:creator>BamBam</dc:creator>
      <dc:date>2023-05-18T12:18:25Z</dc:date>
    </item>
  </channel>
</rss>

