<?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: getArgument works fine in interactive cluster 10.4 LTS, raises error in interactive cluster 10.4 in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/getargument-works-fine-in-interactive-cluster-10-4-lts-raises/m-p/48444#M6049</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;, thank you for your response. Would there be a way to still use the widget value? Or the pyspark parameter if this line is part of the code:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;folder_name = dbutils.widgets.get('folderName')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Without rewriting spark.sql("""query""") into&amp;nbsp;spark.sql(f"""query""")?&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2023 18:49:55 GMT</pubDate>
    <dc:creator>llvu</dc:creator>
    <dc:date>2023-10-05T18:49:55Z</dc:date>
    <item>
      <title>getArgument works fine in interactive cluster 10.4 LTS, raises error in interactive cluster 10.4 LTS</title>
      <link>https://community.databricks.com/t5/get-started-discussions/getargument-works-fine-in-interactive-cluster-10-4-lts-raises/m-p/48414#M6047</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to use the getArgument() function in a spark.sql query. It works fine if I run the notebook via an interactive cluster, but gives an error when executed via a job run in an instance Pool.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;query:&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;OPTIMIZE &amp;lt;table&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;where&lt;/SPAN&gt;&lt;SPAN&gt; date = r&lt;/SPAN&gt;&lt;SPAN&gt;eplace(regexp_extract(getArgument('folderPath'), '=\\\d{8}', 0), '=', '')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Error:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Exception&lt;/SPAN&gt;&lt;SPAN&gt;: Undefined function: getArgument. This function is neither a built-in/temporary function, nor a persistent function that is qualified as spark_catalog.default.getargument.; line 2 pos 49&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can't seem to figure out why this error occurs and how I can solve the issue. As the notebook used for the query is a common notebook used by multiple jobs, I would like to resolve the issue without changing anything to the notebook. A change to the query executed by spark.sql() is possible. Could someone help me out?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Interactive cluster settings:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Driver: Standard_DS3_v2&lt;/P&gt;&lt;P&gt;Workers: Standard_DS3_v2&lt;/P&gt;&lt;P&gt;10.4LTS (includes Apache Spark 3.2.1, Scala 2.12)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pool settings:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Driver: Standard_DS3_v2&lt;/P&gt;&lt;P&gt;Workers: Standard_DS3_v2&lt;/P&gt;&lt;P&gt;10.4LTS (includes Apache Spark 3.2.1, Scala 2.12)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 14:33:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/getargument-works-fine-in-interactive-cluster-10-4-lts-raises/m-p/48414#M6047</guid>
      <dc:creator>llvu</dc:creator>
      <dc:date>2023-10-05T14:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: getArgument works fine in interactive cluster 10.4 LTS, raises error in interactive cluster 10.4</title>
      <link>https://community.databricks.com/t5/get-started-discussions/getargument-works-fine-in-interactive-cluster-10-4-lts-raises/m-p/48444#M6049</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;, thank you for your response. Would there be a way to still use the widget value? Or the pyspark parameter if this line is part of the code:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;folder_name = dbutils.widgets.get('folderName')&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Without rewriting spark.sql("""query""") into&amp;nbsp;spark.sql(f"""query""")?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 18:49:55 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/getargument-works-fine-in-interactive-cluster-10-4-lts-raises/m-p/48444#M6049</guid>
      <dc:creator>llvu</dc:creator>
      <dc:date>2023-10-05T18:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: getArgument works fine in interactive cluster 10.4 LTS, raises error in interactive cluster 10.4</title>
      <link>https://community.databricks.com/t5/get-started-discussions/getargument-works-fine-in-interactive-cluster-10-4-lts-raises/m-p/48601#M6052</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;, thank you for the suggestion. I tried calling the parameter instead of the widget value. However, as I expected, this didn’t resolve the original problem of getArgument() not being recognised as a function.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;query:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;folder_path =&amp;nbsp;&lt;SPAN&gt;dbutils.widgets.get('folderPath')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Spark.sql(“””&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;OPTIMIZE &amp;lt;table&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;where&lt;/SPAN&gt;&lt;SPAN&gt; date = r&lt;/SPAN&gt;&lt;SPAN&gt;eplace(regexp_extract(getArgument('folder_path'), '=\\\d{8}', 0), '=', '') “””)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;error:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;Exception&lt;/SPAN&gt;&lt;SPAN&gt;: Undefined function: getArgument. This function is neither a built-in/temporary function, nor a persistent function that is qualified as spark_catalog.default.getargument.; line 2 pos 49&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 06 Oct 2023 11:12:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/getargument-works-fine-in-interactive-cluster-10-4-lts-raises/m-p/48601#M6052</guid>
      <dc:creator>llvu</dc:creator>
      <dc:date>2023-10-06T11:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: getArgument works fine in interactive cluster 10.4 LTS, raises error in interactive cluster 10.4</title>
      <link>https://community.databricks.com/t5/get-started-discussions/getargument-works-fine-in-interactive-cluster-10-4-lts-raises/m-p/49875#M6054</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Would you be able to respond to my last comment? I couldn't manage to get it working yet.&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 13:47:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/getargument-works-fine-in-interactive-cluster-10-4-lts-raises/m-p/49875#M6054</guid>
      <dc:creator>llvu</dc:creator>
      <dc:date>2023-10-25T13:47:04Z</dc:date>
    </item>
  </channel>
</rss>

