<?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: Arrays of complex type always evaluate to ARRAY&amp;lt;STRING&amp;gt;? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/arrays-of-complex-type-always-evaluate-to-array-lt-string-gt/m-p/5001#M1543</link>
    <description>&lt;P&gt;Hi @Jake Neyer​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for posting your question in our community! We are happy to assist you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2023 09:30:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-05-18T09:30:55Z</dc:date>
    <item>
      <title>Arrays of complex type always evaluate to ARRAY&lt;STRING&gt;?</title>
      <link>https://community.databricks.com/t5/data-engineering/arrays-of-complex-type-always-evaluate-to-array-lt-string-gt/m-p/4999#M1541</link>
      <description>&lt;P&gt;Arrays of complex types seemingly always evaluate to ARRAY&amp;lt;STRING&amp;gt;. Therefore, casting or attempting to load JSON data with empty array values fails. For example, attempting to cast a JSON value of {"likes": []...} on load to the following table schema fail with the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Schema:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;array&amp;lt;struct&amp;lt;gid:string,user:struct&amp;lt;gid:string,name:string,resource_type:string&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Error:&lt;/U&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;"Error copy: [DATATYPE_MISMATCH.CAST_WITHOUT_SUGGESTION] Cannot resolve "likes" due to data type mismatch: cannot cast "ARRAY&amp;lt;STRING&amp;gt;" to "ARRAY&amp;lt;STRUCT&amp;lt;gid: STRING, user: STRUCT&amp;lt;gid: STRING, name: STRING, resource_type: STRING&amp;gt;&amp;gt;&amp;gt;"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What is the best way to handle empty/null complex-typed arrays?&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 13:33:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/arrays-of-complex-type-always-evaluate-to-array-lt-string-gt/m-p/4999#M1541</guid>
      <dc:creator>pt-jake</dc:creator>
      <dc:date>2023-05-01T13:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: Arrays of complex type always evaluate to ARRAY&lt;STRING&gt;?</title>
      <link>https://community.databricks.com/t5/data-engineering/arrays-of-complex-type-always-evaluate-to-array-lt-string-gt/m-p/5001#M1543</link>
      <description>&lt;P&gt;Hi @Jake Neyer​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for posting your question in our community! We are happy to assist you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 09:30:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/arrays-of-complex-type-always-evaluate-to-array-lt-string-gt/m-p/5001#M1543</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-18T09:30:55Z</dc:date>
    </item>
  </channel>
</rss>

