The problem is my destination table won't contain partition related columns. Option 2 in your example. On Sat, Aug 6, 2016 at 12:03 PM Markovitz, Dudu <dmarkov...@paypal.com> wrote:
> Hi > > > > Should your destination table contain the source partitions values? > > > > e.g. > > > > Assuming this is the source table: > > > > *create table src (cust_id int,cust_first_name string,cust_last_name > string) partitioned by (yr string,mn string,dt string);* > > > > Should the destination table look like > > > > *create table dst (cust_id int,cust_first_name string,cust_last_name > string,yr string,mn string,dt string);* > > > > or like > > > > *create table dst (cust_id int,cust_first_name string,cust_last_name > string);* > > > > > > I think I can achieve the first option. > > > > Dudu > > > > > > > > *From:* Nagabhushanam Bheemisetty [mailto:nbheemise...@gmail.com] > *Sent:* Friday, August 05, 2016 12:05 AM > *To:* user@hive.apache.org > *Subject:* Crate Non-partitioned table from partitioned table using > CREATE TABLE .. LIKE > > > > Hi I've a scenario where I need to create a table from partitioned table > but my destination table should not be partitioned. I won't be knowing the > schema so I cannot create manually the destination table. By the way both > tables are external tables. >