As it says in the API docs <https://spark.apache.org/docs/1.2.0/api/scala/index.html#org.apache.spark.sql.SchemaRDD>, tables created with registerTempTable are local to the context that creates them:
... The lifetime of this temporary table is tied to the SQLContext > <https://spark.apache.org/docs/1.2.0/api/scala/org/apache/spark/sql/SQLContext.html> > that > was used to create this SchemaRDD. On Tue, Mar 3, 2015 at 5:52 AM, shahab <[email protected]> wrote: > Hi, > > 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(HiveMetaStore.java:1373) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > > at java.lang.reflect.Method.invoke(Method.java:606) > > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:103) > > best, > /Shahab > > >
