Have you tried the following command ?
REFRESH TABLE <table>

Cheers



On Tue, Dec 1, 2015 at 1:54 AM, Ashok Kumar <ashok34...@yahoo.com.invalid>
wrote:

> Hi,
>
> I am new to Spark.
>
> I am trying to use spark-sql with SPARK CREATED and HIVE CREATED tables.
>
> I have successfully made Hive metastore to be used by Spark.
>
> In spark-sql I can see the DDL for Hive tables. However, when I do select
> count(1) from HIVE_TABLE it always returns zero rows.
>
> If I create a table in spark as create table SPARK_TABLE as select * from
> HIVE_TABLE, the table schema is created but no data.
>
> I can then use Hive to do INSET SELECT from HIVE_TABLE into SPARK_TABLE.
> That works.
>
> I can then use spark-sql to query the table.
>
> My questions:
>
>
>    1. Is this correct that spark-sql only sees data in spark created
>    tables but not any data in Hive tables?
>    2. How can I make Spark read data from existing Hive tables.
>
>
>
> Thanks
>

Reply via email to