Re: Column selection in Hive

2014-07-01 Thread Lefty Leverenz
Here's the wikidoc for dropping columns with ALTER TABLE ... REPLACE COLUMNS: Add/Replace Columns . But you'd still have to list 190 columns, so CTAS would be more direct. AFAIK, HiveQL doesn

Re: Column selection in Hive

2014-07-01 Thread Sarfraz Ramay
Hi, A workaround could be to create a table with all the columns and then drop the columns you don't need. Hope it helps. Regards, Sarfraz Rasheed Ramay (DIT) Dublin, Ireland. On Tue, Jul 1, 2014 at 5:20 AM, Szehon Ho wrote: > Why dont you just use CTAS (Create table as select), putting the 1

Re: Column selection in Hive

2014-06-30 Thread Szehon Ho
Why dont you just use CTAS (Create table as select), putting the 190 columns in the select part? I guess you're maybe asking for any way to not have to type all the columns, but I'm not aware of any. https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable