<?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: Alternative of spark.sql.globalTempDatabase in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150951#M53545</link>
    <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/195487"&gt;@NageshPatil&lt;/a&gt;&amp;nbsp;: Welcome to the Databricks Community forum and sharing your thoughts. As mentioned in my original post above, Databricks Free Edition uses serverless cluster only - hence I cannot use SQL Warehouse cluster. Moreover, as mentioned in post,&amp;nbsp;&lt;SPAN&gt;I'm working on passing structured data &lt;FONT color="#0000FF"&gt;between two notebooks &lt;FONT color="#000000"&gt;(that is, not between two cells of a notebook).&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 14 Mar 2026 19:34:57 GMT</pubDate>
    <dc:creator>Saf4Databricks</dc:creator>
    <dc:date>2026-03-14T19:34:57Z</dc:date>
    <item>
      <title>Alternative of spark.sql.globalTempDatabase</title>
      <link>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150859#M53533</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;: Since I'm using Databricks Free Edition that uses only serverless cluster, I cannot use&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;spark.sql.globalTempDatabase&lt;/STRONG&gt;&amp;nbsp;&lt;/EM&gt;in my code below. What's an alternative solution for the &lt;STRONG&gt;Caller_Notebook&lt;/STRONG&gt; below. Following error occurred in the second line of this notebook:&amp;nbsp;&lt;SPAN&gt;&lt;FONT color="#FF0000"&gt;globalTempDatabase is not available in serverless compute environment&lt;/FONT&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I'm working on passing structured data between two notebooks. In the following code, data from called notebook is supposed to return data (1 column with 5 rows) to a caller notebook:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Called_Notebook&lt;/STRONG&gt;:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;spark.range(5).toDF("MyCol").createOrReplaceTempView("MyView")
dbutils.notebook.exit("my_data")&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;Caller_Notebook&lt;/STRONG&gt;:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;returned_table = dbutils.notebook.run("./Called_Notebook", 60)
My_temp_db = spark.conf.get("spark.sql.globalTempDatabase")
display(table(My_temp_db + "." + returned_table))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Mar 2026 01:28:51 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150859#M53533</guid>
      <dc:creator>Saf4Databricks</dc:creator>
      <dc:date>2026-03-14T01:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative of spark.sql.globalTempDatabase</title>
      <link>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150860#M53534</link>
      <description>&lt;P&gt;You can create tables if large data is involved or use session temporary views for data passing if its conditions are met.&lt;/P&gt;&lt;P&gt;Details&amp;nbsp;&lt;A href="https://docs.databricks.com/aws/en/compute/serverless/limitations#data-access-and-storage" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Mar 2026 02:33:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150860#M53534</guid>
      <dc:creator>balajij8</dc:creator>
      <dc:date>2026-03-14T02:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative of spark.sql.globalTempDatabase</title>
      <link>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150864#M53535</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/210897"&gt;@balajij8&lt;/a&gt;, As you can see in &lt;FONT color="#0000FF"&gt;Called_Notebook&lt;/FONT&gt;, I'm using temporary view. But the issue is in the first line of &lt;FONT color="#FF6600"&gt;Caller_Notebook &lt;/FONT&gt;where I'm trying to access temp db so I can use it as schema.My_View in the second line:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;My_temp_db = spark.conf.get("spark.sql.globalTempDatabase")
display(table(My_temp_db + "." + returned_table))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Mar 2026 03:03:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150864#M53535</guid>
      <dc:creator>Saf4Databricks</dc:creator>
      <dc:date>2026-03-14T03:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative of spark.sql.globalTempDatabase</title>
      <link>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150872#M53536</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/105089"&gt;@Saf4Databricks&lt;/a&gt;&amp;nbsp;As you can see &lt;A href="https://docs.databricks.com/aws/en/compute/serverless/limitations#data-access-and-storage" target="_blank"&gt;here&lt;/A&gt;,&amp;nbsp;&lt;SPAN&gt;Global temp views are not supported in serverless. You can remove global temp database &amp;amp; temp db in the code as its not supported. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To use the session temporary views, you can run the notebook to keep the view in session &lt;/SPAN&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;SPAN&gt;run &lt;/SPAN&gt;&lt;SPAN&gt;"./Notebook" and use the view myview directly in table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Caller Notebook&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;SPAN&gt;run &lt;/SPAN&gt;&lt;SPAN&gt;"./Notebook1"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;display&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;table&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"myview"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 14 Mar 2026 05:24:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150872#M53536</guid>
      <dc:creator>balajij8</dc:creator>
      <dc:date>2026-03-14T05:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative of spark.sql.globalTempDatabase</title>
      <link>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150880#M53540</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/105089"&gt;@Saf4Databricks&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;As&amp;nbsp;mentioned in&amp;nbsp;databricks documentation and also by&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/210897"&gt;@balajij8&lt;/a&gt;&amp;nbsp;, you can only use temp table with SQL warehouse cluster. if you are working with non-serverless cluster i.e. interactive cluster then simply run your&amp;nbsp;&lt;STRONG&gt;Called_Notebook&amp;nbsp;&lt;/STRONG&gt;in your&amp;nbsp;&lt;STRONG&gt;Caller_Notebook&amp;nbsp;&lt;/STRONG&gt;in first cell.&lt;BR /&gt;once you run your called_notebook as your first cell then the created temp view directly available to query in your caller notebook.&lt;/P&gt;&lt;P&gt;PFB sample code in&amp;nbsp;&lt;STRONG&gt;caller_notebook&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;cell 1:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%run ./Called_Notebook&lt;/LI-CODE&gt;&lt;P&gt;cell 2:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;df = spark.table("myview")
df.display()&lt;/LI-CODE&gt;&lt;P&gt;or also you can try&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%sql SELECT * FROM myview&lt;/LI-CODE&gt;&lt;P&gt;Please try it and accept as solution if its working as per your requirement&lt;/P&gt;</description>
      <pubDate>Sat, 14 Mar 2026 07:09:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150880#M53540</guid>
      <dc:creator>NageshPatil</dc:creator>
      <dc:date>2026-03-14T07:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative of spark.sql.globalTempDatabase</title>
      <link>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150950#M53544</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/210897"&gt;@balajij8&lt;/a&gt;&amp;nbsp;: Your suggested code of the Caller_Notebook returns the following &lt;FONT color="#FF0000"&gt;error &lt;/FONT&gt;[I'm using the name as my_view]:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;The table or view `my_view` cannot be found. Verify the spelling and correctness of the schema and catalog. If you did not qualify the name with a schema, verify the current_schema() output, or qualify the name with the correct schema and catalog. To tolerate the error on drop use DROP VIEW IF EXISTS or DROP TABLE IF EXISTS. SQLSTATE: 42P01&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Mar 2026 19:27:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150950#M53544</guid>
      <dc:creator>Saf4Databricks</dc:creator>
      <dc:date>2026-03-14T19:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative of spark.sql.globalTempDatabase</title>
      <link>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150951#M53545</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/195487"&gt;@NageshPatil&lt;/a&gt;&amp;nbsp;: Welcome to the Databricks Community forum and sharing your thoughts. As mentioned in my original post above, Databricks Free Edition uses serverless cluster only - hence I cannot use SQL Warehouse cluster. Moreover, as mentioned in post,&amp;nbsp;&lt;SPAN&gt;I'm working on passing structured data &lt;FONT color="#0000FF"&gt;between two notebooks &lt;FONT color="#000000"&gt;(that is, not between two cells of a notebook).&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Mar 2026 19:34:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150951#M53545</guid>
      <dc:creator>Saf4Databricks</dc:creator>
      <dc:date>2026-03-14T19:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative of spark.sql.globalTempDatabase</title>
      <link>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150959#M53547</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/105089"&gt;@Saf4Databricks&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the below.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Called_Notebook&lt;/STRONG&gt;:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;spark.range(5).toDF("MyCol").createOrReplaceTempView("MyView")&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;Caller_Notebook&lt;/STRONG&gt;:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%run "./Notebook"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;display(table("MyView"))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;MyCol&lt;BR /&gt;0&lt;BR /&gt;1&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;4&lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2026 04:09:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150959#M53547</guid>
      <dc:creator>balajij8</dc:creator>
      <dc:date>2026-03-15T04:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative of spark.sql.globalTempDatabase</title>
      <link>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150982#M53553</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/210897"&gt;@balajij8&lt;/a&gt;, I'm already aware of the use of &lt;STRONG&gt;&lt;EM&gt;%run&lt;/EM&gt;&lt;/STRONG&gt; command. I'm working on practicing the use of&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;dbutils.notebook.run() API&lt;/EM&gt; &lt;/STRONG&gt;since I'm working on cases where &lt;EM&gt;%run&lt;/EM&gt; command does not work.&lt;/P&gt;&lt;P&gt;The &lt;EM&gt;dbutils.notebook API &lt;/EM&gt;complements &lt;EM&gt;%run&lt;/EM&gt; because it lets you pass parameters to and return values from a notebook. Likewise,&amp;nbsp;you can use &lt;EM&gt;dbutils.notebook.run()&lt;/EM&gt; to invoke an R notebook - but you can't do it with &lt;EM&gt;%run&lt;/EM&gt; command.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2026 16:47:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/alternative-of-spark-sql-globaltempdatabase/m-p/150982#M53553</guid>
      <dc:creator>Saf4Databricks</dc:creator>
      <dc:date>2026-03-15T16:47:22Z</dc:date>
    </item>
  </channel>
</rss>

