When I tried to insert into a Partiotioned table I am getting the bellow error:
SemanticException [Error 10044]: Line 1:23 Cannot insert into target table because column number/types are different : Table insclause-0 has 6 columns, and the 3 columns are partitioned and we not required any filters we have to dump/store from non partitioned table to partitioned table.
My table:
Source:
id name salary dep
1 sai 1000 sales
2 syam 2000 hr
3 sundar 3000 bank
Target:
id name salary dep
1 sai 1000 sales
2 syam 2000 hr
3 sundar 3000 bank
partition (name string, dep string)
Please let me how to copy from source to target
tried below way.
insert into target_partitioned_table partition(name,dep) select id from source_table;