hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabi D <gabi...@gmail.com>
Subject Re: We cannot insert data to external table right?
Date Wed, 14 Mar 2012 11:40:12 GMT
I haven't tried external table with a none hdfs location. external with
hdfs location works great.
Question in this case - on which machine does hive look for the external
location (as it is a clustered env)? maybe you are not looking at the right
one ...

On Wed, Mar 14, 2012 at 8:34 AM, Lu, Wei <wlu@microstrategy.com> wrote:

>  Hi ,****
>
> ** **
>
> Can we insert data to external hive tables?****
>
> ** **
>
> **1)    **Create an external table****
>
> create external table binary_tbl_local(byt TINYINT, bl boolean, it int,
> lng BIGINT, flt float, dbl double, shrt SMALLINT, str string) row format
> serde 'org.apache.hadoop.hive.contrib.serde2.TypedBtesSerDe' stored as
> sequencefile location 'file:////home/wlu/hive_local';****
>
> ** **
>
> /home/wlu/hive_local is empty, and I insert data to the external table:***
> *
>
> **2)    **Insert data to the table****
>
> insert overwrite table binary_tbl_local select * from another_tbl_hdfs;***
> *
>
> ** **
>
> But there is still nothing under the local folder. And “select * from
> binary_tbl_local” returns no results.****
>
> ** **
>
> So I guess we cannot insert data to external table right?****
>
> ** **
>
> Regards,****
>
> Wei****
>

Mime
View raw message