<?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 How does one access/use SparkSQL functions like array_size? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-does-one-access-use-sparksql-functions-like-array-size/m-p/19288#M12916</link>
    <description>&lt;P&gt;The following doesn't work for me:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%sql
SELECT user_id, array_size(education) AS edu_cnt
FROM users
ORDER BY edu_cnt DESC 
LIMIT 10; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get an error saying: &lt;/P&gt;&lt;P&gt;&lt;I&gt;Error in SQL statement: AnalysisException: Undefined function: array_size. This function is neither a built-in/temporary function, nor a persistent function that is qualified as spark_catalog.default.array_size.; line 1 pos 16&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The documentation pretty clearly says this function exists.  Help?&lt;/P&gt;</description>
    <pubDate>Sun, 29 May 2022 23:51:15 GMT</pubDate>
    <dc:creator>dtabass</dc:creator>
    <dc:date>2022-05-29T23:51:15Z</dc:date>
    <item>
      <title>How does one access/use SparkSQL functions like array_size?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-does-one-access-use-sparksql-functions-like-array-size/m-p/19288#M12916</link>
      <description>&lt;P&gt;The following doesn't work for me:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%sql
SELECT user_id, array_size(education) AS edu_cnt
FROM users
ORDER BY edu_cnt DESC 
LIMIT 10; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get an error saying: &lt;/P&gt;&lt;P&gt;&lt;I&gt;Error in SQL statement: AnalysisException: Undefined function: array_size. This function is neither a built-in/temporary function, nor a persistent function that is qualified as spark_catalog.default.array_size.; line 1 pos 16&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The documentation pretty clearly says this function exists.  Help?&lt;/P&gt;</description>
      <pubDate>Sun, 29 May 2022 23:51:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-does-one-access-use-sparksql-functions-like-array-size/m-p/19288#M12916</guid>
      <dc:creator>dtabass</dc:creator>
      <dc:date>2022-05-29T23:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: How does one access/use SparkSQL functions like array_size?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-does-one-access-use-sparksql-functions-like-array-size/m-p/19289#M12917</link>
      <description>&lt;P&gt;&lt;A href="https://docs.databricks.com/spark/latest/spark-sql/language-manual/functions/array_size.html" alt="https://docs.databricks.com/spark/latest/spark-sql/language-manual/functions/array_size.html" target="_blank"&gt;https://docs.databricks.com/spark/latest/spark-sql/language-manual/functions/array_size.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Since:&lt;/B&gt; &lt;A href="https://docs.databricks.com/release-notes/runtime/10.5.html" alt="https://docs.databricks.com/release-notes/runtime/10.5.html" target="_blank"&gt;Databricks Runtime 10.5&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you might wanna check your databricks version.&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 07:17:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-does-one-access-use-sparksql-functions-like-array-size/m-p/19289#M12917</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2022-05-30T07:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: How does one access/use SparkSQL functions like array_size?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-does-one-access-use-sparksql-functions-like-array-size/m-p/19290#M12918</link>
      <description>&lt;P&gt;Thanks!  I was incorrectly thinking the Community Edition clusters would be whatever the latest was; not the case, what I was getting was older (dated back to a year or so ago when I was last working with Spark).  I can use the functions now.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 17:11:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-does-one-access-use-sparksql-functions-like-array-size/m-p/19290#M12918</guid>
      <dc:creator>dtabass</dc:creator>
      <dc:date>2022-05-30T17:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: How does one access/use SparkSQL functions like array_size?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-does-one-access-use-sparksql-functions-like-array-size/m-p/19291#M12919</link>
      <description>&lt;P&gt;Hey there @Michael Carey​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope everything is going great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are glad to hear that you were able to find a solution to your question. Would you be happy to mark an answer as best so that other members can find the solution more quickly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 17:32:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-does-one-access-use-sparksql-functions-like-array-size/m-p/19291#M12919</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-28T17:32:22Z</dc:date>
    </item>
  </channel>
</rss>

