<?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: Error while running Job sparkSession is null while trying to executeCollectResult in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/error-while-running-job-sparksession-is-null-while-trying-to/m-p/76303#M7628</link>
    <description>&lt;P&gt;Although it won't be the root cause of your issue, one thing worth mentioning is that `&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;trigger&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;once&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;)` is obsolete by now and was replaced by `availableNow=True`&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2024 12:39:32 GMT</pubDate>
    <dc:creator>Witold</dc:creator>
    <dc:date>2024-07-01T12:39:32Z</dc:date>
    <item>
      <title>Error while running Job sparkSession is null while trying to executeCollectResult</title>
      <link>https://community.databricks.com/t5/get-started-discussions/error-while-running-job-sparksession-is-null-while-trying-to/m-p/76056#M7626</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have started getting following error while running jobs in databrick. It started failing since last few days. Recently I have migrated to unity catalogue, no other change was made recently. I am running on DBR 13.3 LTS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;com.google.common.util.concurrent.ExecutionError: java.lang.AssertionError: assertion failed: sparkSession is null while trying to executeCollectResult&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;This is streaming code which runs jobs and its scheduled to run after every 2 hours.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(spark.readStream.&lt;/SPAN&gt;&lt;SPAN&gt;format&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"delta"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;option&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"useNotification"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"true"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;option&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"includeExistingFiles"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"true"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;option&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"allowOverwrites"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;option&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"ignoreMissingFiles"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;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t;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;foreachBatch&lt;/SPAN&gt;&lt;SPAN&gt;(foreachBatchFunction)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;start&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;awaitTermination&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Appreciate any help.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sanjay&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 11:52:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/error-while-running-job-sparksession-is-null-while-trying-to/m-p/76056#M7626</guid>
      <dc:creator>sanjay</dc:creator>
      <dc:date>2024-06-28T11:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error while running Job sparkSession is null while trying to executeCollectResult</title>
      <link>https://community.databricks.com/t5/get-started-discussions/error-while-running-job-sparksession-is-null-while-trying-to/m-p/76303#M7628</link>
      <description>&lt;P&gt;Although it won't be the root cause of your issue, one thing worth mentioning is that `&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;trigger&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;once&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;)` is obsolete by now and was replaced by `availableNow=True`&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 12:39:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/error-while-running-job-sparksession-is-null-while-trying-to/m-p/76303#M7628</guid>
      <dc:creator>Witold</dc:creator>
      <dc:date>2024-07-01T12:39:32Z</dc:date>
    </item>
  </channel>
</rss>

