I have tried with using hive command
insert into table partitioned_table_name partition(partition_col) select * from non-Partitioned table ;
Yes, of course you can do it. But you need to select correct sequence of columns while inserting. for example, if your table structure is like this -
create table mytable_patitioned (c1 int, c2 string) partition by c3 int;
Then your insert statement should be like below - partition column should be last column in select statement.
insert into mytable_patitioned partition(c3) select c1,c2,c3 from non_part_table;
Yes, of course you can do it. But you need to select correct sequence of columns while inserting. for example, if your table structure is like this -
Then your insert statement should be like below - partition column should be last column in select statement.