Question is, while registering, using registerTempTable() and while dropping, using a dropTempView(), would it go and hit the same TempTable internally or would search for a registered view? Not sure. Any idea?
On Sat, May 26, 2018 at 9:04 PM, SNEHASISH DUTTA <info.snehas...@gmail.com> wrote: > I think it's dropTempView > > On Sat, May 26, 2018, 8:56 PM Aakash Basu <aakash.spark....@gmail.com> > wrote: > >> Hi all, >> >> I'm trying to use dropTempTable() after the respective Temporary Table's >> use is over (to free up the memory for next calculations). >> >> Newer Spark Session doesn't need sqlContext, so, it is confusing me on >> how to use the function. >> >> 1) Tried, same DF which I used to register a temp table to do - >> >> DF.dropTempTable('xyz') >> >> Didn't work. >> >> 2) Tried following way too, as spark internally invokes sqlContext too >> along with sparkContext, but didn't work - >> >> spark.dropTempTable('xyz') >> >> 3) Tried spark.catalog to drop, this failed too - >> >> spark.catalog.dropTempTable('xyz') >> >> >> What to do? 1.6 examples on internet are not working in the 2.3 version >> for dropTempTable(). >> >> Thanks, >> Aakash. >> >