the error message is correct.  remember the partition columns are not
stored with the data and by doing a "select *" that's what doing.  And this
has nothing to do with ORC either its a Hive thing. :)

so your second approach was close.  just omit the partition columns yr, mo,
day.


On Wed, Mar 26, 2014 at 8:18 AM, P lva <ruvi...@gmail.com> wrote:

> Hello,
>
> I'm trying to convert managed partitioned text table into compressed orc
> partitioned table.
>
> I created the a new table with the same schema but when I try inserting
> data the errors says there are different number of columns.
>
> I tried doing
>
> From table a insert into table b(yr=2014, mo=01, day=01 ) select * where
> yr='2014' and month='01' and day='01'
>
> Also tried doing this
>
> From table a insert into table b(yr=2014, mo=01, day=01) select a.column1,
> a.column2, a.column3, ....... where yr='2014' and month='01' and day='01'
>
> which didnt work either
>
> How does one copy data from a partitioned table to another along with
> partition information ?
>
> Thanks
>
>
>
>
>
>
>
>
>

Reply via email to