<?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 What is the difference between createTempView, createGlobalTempView and registerTempTable in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/what-is-the-difference-between-createtempview/m-p/29257#M21001</link>
    <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi, friends!&lt;/P&gt;
&lt;P&gt;I have a question about difference between this three functions:&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;dataframe . &lt;B&gt;createTempView&lt;/B&gt;&lt;/LI&gt;&lt;LI&gt;dataframe . &lt;B&gt;createGlobalTempView&lt;/B&gt; &lt;/LI&gt;&lt;LI&gt;dataframe . &lt;B&gt;registerTempTable&lt;/B&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;all of them create intermediate tables. &lt;/P&gt;
&lt;P&gt;How to decide which I have to choose in computations?&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 01 Apr 2017 15:03:26 GMT</pubDate>
    <dc:creator>pmezentsev</dc:creator>
    <dc:date>2017-04-01T15:03:26Z</dc:date>
    <item>
      <title>What is the difference between createTempView, createGlobalTempView and registerTempTable</title>
      <link>https://community.databricks.com/t5/data-engineering/what-is-the-difference-between-createtempview/m-p/29257#M21001</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi, friends!&lt;/P&gt;
&lt;P&gt;I have a question about difference between this three functions:&lt;/P&gt;
&lt;UL&gt;&lt;LI&gt;dataframe . &lt;B&gt;createTempView&lt;/B&gt;&lt;/LI&gt;&lt;LI&gt;dataframe . &lt;B&gt;createGlobalTempView&lt;/B&gt; &lt;/LI&gt;&lt;LI&gt;dataframe . &lt;B&gt;registerTempTable&lt;/B&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;all of them create intermediate tables. &lt;/P&gt;
&lt;P&gt;How to decide which I have to choose in computations?&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Apr 2017 15:03:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/what-is-the-difference-between-createtempview/m-p/29257#M21001</guid>
      <dc:creator>pmezentsev</dc:creator>
      <dc:date>2017-04-01T15:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: What is the difference between createTempView, createGlobalTempView and registerTempTable</title>
      <link>https://community.databricks.com/t5/data-engineering/what-is-the-difference-between-createtempview/m-p/29258#M21002</link>
      <description>&lt;P&gt;&lt;/P&gt;
&lt;P&gt;From my understanding, &lt;B&gt;createTempView &lt;/B&gt;(or more appropriately &lt;B&gt;createOrReplaceTempView&lt;/B&gt;) has been introduced in Spark 2.0 to replace &lt;B&gt;registerTempTable, &lt;/B&gt;which has been deprecated in 2.0. &lt;B&gt;CreateTempView&lt;/B&gt; creates an in memory reference to the Dataframe in use. The lifetime for this is tied to the spark session in which the Dataframe was created in. &lt;B&gt;createGlobalTempView &lt;/B&gt;(which is not present in 2.0 but is added in 2.1.0)&lt;B&gt; &lt;/B&gt;on the other hand allows you to create the references that can be used across spark sessions. So depending upon whether you need to share data across sessions, you can use either of the methods. Ideally your notebooks in same cluster share the same spark session, but there is an option to setup clusters where each notebook has its own session. So all it boils down to is that where do you create the data frame and where do you want to access it.&lt;/P&gt; 
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 22:39:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/what-is-the-difference-between-createtempview/m-p/29258#M21002</guid>
      <dc:creator>KeshavP</dc:creator>
      <dc:date>2017-04-11T22:39:49Z</dc:date>
    </item>
  </channel>
</rss>

