<?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: How to retrieve Spark Session inside java jar library installed on Cluster in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/how-to-retrieve-spark-session-inside-java-jar-library-installed/m-p/92789#M8551</link>
    <description>&lt;P&gt;Hi , I am having&amp;nbsp; a JAVA&amp;nbsp; jar in volume and trying to get the existing session with unity catalog enabled . I only get the spark_catalog. Any help will be appreciated .&lt;/P&gt;</description>
    <pubDate>Fri, 04 Oct 2024 18:23:15 GMT</pubDate>
    <dc:creator>hemprasad</dc:creator>
    <dc:date>2024-10-04T18:23:15Z</dc:date>
    <item>
      <title>How to retrieve Spark Session inside java jar library installed on Cluster</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-retrieve-spark-session-inside-java-jar-library-installed/m-p/79182#M8547</link>
      <description>&lt;P&gt;I have a java app in form of jar package. This jar is installed on a Databricks cluster. This jar package reads and writes to few tables in databricks. In order to achieve that, I need SparkSession available in the code. Given that spark session is already running in Databricks, I need to somehow access it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried various methods like&amp;nbsp;&lt;SPAN&gt;SparkSession.builder, SparkSession.active and SparkSession.getActiveSession but none are available in databricks. How can I access the session inside my code?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I tried to pass session directly via main function arguments and it's working but as a requirement of the main function, I also need to pass some other String arguments so I need a way to get session in code some other way&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 06:42:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-retrieve-spark-session-inside-java-jar-library-installed/m-p/79182#M8547</guid>
      <dc:creator>ayush19</dc:creator>
      <dc:date>2024-07-18T06:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve Spark Session inside java jar library installed on Cluster</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-retrieve-spark-session-inside-java-jar-library-installed/m-p/79236#M8549</link>
      <description>&lt;P&gt;Thank you for reply. This solves the issue. I was passing ".appName" as well with builder which was causing the issue. I tried the solution you mentioned it worked. Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 12:46:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-retrieve-spark-session-inside-java-jar-library-installed/m-p/79236#M8549</guid>
      <dc:creator>ayush19</dc:creator>
      <dc:date>2024-07-18T12:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve Spark Session inside java jar library installed on Cluster</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-retrieve-spark-session-inside-java-jar-library-installed/m-p/92789#M8551</link>
      <description>&lt;P&gt;Hi , I am having&amp;nbsp; a JAVA&amp;nbsp; jar in volume and trying to get the existing session with unity catalog enabled . I only get the spark_catalog. Any help will be appreciated .&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2024 18:23:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-retrieve-spark-session-inside-java-jar-library-installed/m-p/92789#M8551</guid>
      <dc:creator>hemprasad</dc:creator>
      <dc:date>2024-10-04T18:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve Spark Session inside java jar library installed on Cluster</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-retrieve-spark-session-inside-java-jar-library-installed/m-p/93608#M8552</link>
      <description>&lt;P&gt;Thanks for the update, I will try it too.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2024 10:13:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-retrieve-spark-session-inside-java-jar-library-installed/m-p/93608#M8552</guid>
      <dc:creator>IslaGray</dc:creator>
      <dc:date>2024-10-11T10:13:59Z</dc:date>
    </item>
  </channel>
</rss>

