Thanks Michael. I understand now.


On Tue, Mar 3, 2015 at 9:38 PM, Michael Armbrust <> wrote:
As it says in the API docs, tables created with registerTempTable are local to the context that creates them:

... The lifetime of this temporary table is tied to the SQLContext that was used to create this SchemaRDD. 

On Tue, Mar 3, 2015 at 5:52 AM, shahab <> wrote:
I did an experiment with Hive and SQL context , I queried Cassandra using CassandraAwareSQLContext (a custom SQL context from Calliope) , then I registered the "rdd" as a temp table , next I tried to query it using HiveContext, but it seems that hive context can not see the registered table suing SQL context. Is this a normal case?

Stack trace:

 ERROR hive.ql.metadata.Hive - NoSuchObjectException(message:default.MyTableName table not found)

at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_table(

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(

at sun.reflect.DelegatingMethodAccessorImpl.invoke(

at java.lang.reflect.Method.invoke(

at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(