title: Is it possible to insert into temporary table in spark?
body: <p>I tested below queries using Databricks with Apache Spark 2.4: </p>
  
  <pre class="lang-sql prettyprint-override"><code>%sql
  
  &lt;step1&gt;
  create temporary view temp_view_t
  as select 1 as no, 'aaa' as str;
  
  &lt;step2&gt;
  insert into temp_view_t values (2,'bbb');
  </code></pre>
  
  <p>And then I got this error message.</p>
  
  <blockquote>
    <p>Error in SQL statement: AnalysisException: Inserting into an RDD-based table is not allowed.;;
    'InsertIntoTable Project [1 AS no#824, aaa AS str#825], false, false
    +- LocalRelation [col1#831, col2#832]</p>
  </blockquote>
  
  <p><strong>My questions are</strong></p>
  
  <ol>
  <li>Is it impossible to insert into temporary table in spark?</li>
  <li>How can I work for creating temporary data in spark sql?</li>
  </ol>
  
  <p>Thank you.</p>