hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manish dunani <manishd...@gmail.com>
Subject Re: Hive Query - Issue
Date Mon, 02 Sep 2013 11:52:32 GMT
Hello,

I think you are working with dynamic partition.
Then you do not need to mention it's value.you only need to put partition
like this:::

try this::

insert overwrite table table_baseline partition (sourcedate) select * from
(select * from table_a where sourcedate='tablea_2013_08' union all select *
from table_b where sourcedate='tableb_2013_08') final

If your problem will not resolve from this then you need to count the no.of
columns in table i think problem is there then correct it if you not and
try once again.I also found the same error in past..



On Mon, Sep 2, 2013 at 5:02 PM, Manickam P <manickam.p@outlook.com> wrote:

>  Hello Experts,
>
> when i try to execute the below query i'm getting error. Please help me to
> correct this.
>
> insert overwrite table table_baseline partition
> (sourcedate='base_2013_08') select * from (select * from table_a where
> sourcedate='tablea_2013_08' union all select * from table_b where
> sourcedate='tableb_2013_08') final
>
> My intention here is i want to populate the table_baseline by using the
> all records from table_a and table_b with partition. I am getting the below
> error.
>
> *Error in semantic analysis: Line 1:23 Cannot insert into target table
> because column number/types are different ''BASE_2013_08'': Table
> insclause-0 has 62 columns, but query has 63 columns.*
>
> I verified the column count and types everything is same but here it says
> some difference. The same query works fine without having any partitions in
> all the three tables but getting error while executing with partitions.
>
>
> please help.
>
>
>
> Thanks
> Manickam P
>



-- 
Regards

*Manish Dunani*
*Contact No* : +91 9408329137
*skype id* : manish.dunani*
*

Mime
View raw message