How to access broadcasted DataFrame in Spark
<p>I have created two dataframes which are from Hive tables(PC_ITM and ITEM_SELL) and big in size and I am using those 
frequently in the SQL query by registering as table.But as those are big, it is taking much time 
to get the query result.So I have saved them as parquet file and then read them and registered as temporary table.But still I am not getting good performance so I have broadcasted those data-frames and then registered as tables as below.</p>

<pre><code>PC_ITM_DF=sqlContext.parquetFile("path")
val PC_ITM_BC=sc.broadcast(PC_ITM_DF)
val PC_ITM_DF1=PC_ITM_BC
PC_ITM_DF1.registerAsTempTable("PC_ITM")

ITM_SELL_DF=sqlContext.parquetFile("path")
val ITM_SELL_BC=sc.broadcast(ITM_SELL_DF)
val ITM_SELL_DF1=ITM_SELL_BC.value
ITM_SELL_DF1.registerAsTempTable(ITM_SELL)


sqlContext.sql("JOIN Query").show
</code></pre>

<p>But still I cant achieve performance it is taking same time as when those data frames are not broadcasted.</p>

<p>Can anyone tell if this is the right approach of broadcasting and using it?`</p>