Re: How to create new table like existing with an extra column in single query.

2015-08-11 Thread venkatesh b
Ok finally got the solution. "Create table if not exists newTable as select oldTable.*, "" as newColumn from oldTable" Regards Venkatesh On Tuesday, August 11, 2015, venkatesh b wrote: > Thanks Adam. > > As mentioned we have a need that in a single query it shoul

Re: How to create new table like existing with an extra column in single query.

2015-08-10 Thread venkatesh b
. * On Monday, August 10, 2015, LaStrange, Adam wrote: > How about: > > > > create table XXX like YYY; > > alter table XXX add columns (new_column int); > > > > *From:* venkatesh b [mailto:venkateshmailingl...@gmail.com > ] > *Sent:* Monday, August 10, 2015

Re: How to create new table like existing with an extra column in single query.

2015-08-10 Thread venkatesh b
Wangwenli wrote: > something like this? > create table newTable as select oldTable.*, newCol1,newCol2 from oldTable; > > -- > wenli > Regards > > > *From:* venkatesh b > > *Date:* 2015-08-10 20:54 > *To:* user > *Subject:* Ho

How to create new table like existing with an extra column in single query.

2015-08-10 Thread venkatesh b
Hello, In hive we got a need that we need to create a new table like the old table with an extra column at run time. This must be done in a single query. No second query with alter table statement. Query like: Create table new_table like old_table , new_column datatype; Please help me out, sear

Is it worth storing in ORC for one time read. And can replace hive with HBase?

2015-08-06 Thread venkatesh b
Hi, here I got two things to know. Columns size In hive tables Size of each record is normal only(around 20 columns containing, int type columns and string columns with length 50 chars, not very long columns are present). FIRST: In our project we use hive. We daily get new data. We need to proces

Is it worth of using ORC format in my case. Can I replace hive with HBase.

2015-08-06 Thread venkatesh b
Hi, here I got two things to know. FIRST: In our project we use hive. We daily get new data. We need to process this new data only once. And send this processed data to RDBMS. Here in processing we majorly use many complex queries with joins with where condition and grouping functions. There are ma