Re: java.lang.TypeNotPresentException: Type timestamp not present

2014-06-02 Thread Eugene Koifman
instead of org.apache.hcatalog.pig.HCatStorer() use org.apache.hive.hcatalog.pig.HCatStorer() On Mon, Jun 2, 2014 at 12:54 PM, Rahul Channe wrote: > Try loading the data in a temporary hive table with datatype as String, > then you can populate the data in the final table > > insert into table

Backend error : java.lang.String cannot be cast to java.lang.Integer

2014-06-02 Thread Patcharee Thongtra
Hi, I am using hive with pig. In my pig script I tried to query and sort data from a hive table as below: query = load 'fino31' USING org.apache.hive.hcatalog.pig.HCatLoader(); z_query = FILTER query BY zone==2 and z >= 2 and z <= 9; z_order = ORDER z_query by z; dump z_order; the column 'z'

Re: alter table add more columns

2014-06-02 Thread Mohammad Tariq
Sorry for answering in a hurry. By "yes" I meant adding new partition value and not the partition column. @Ashish : Thanks for the correction. *Warm regards,* *Mohammad Tariq* *cloudfront.blogspot.com * On Tue, Jun 3, 2014 at 2:52 AM, Ashish Garg wrote: > No, y

Re: alter table add more columns

2014-06-02 Thread Ashish Garg
No, you can't add other partition column. you have to work with your current partitions. Best Regards. On Mon, Jun 2, 2014 at 5:22 PM, Ashish Garg wrote: > No, you can add other partition column. you have to work with your current > partitions. > Best Regards. > > > On Mon, Jun 2, 2014 at 5:17

Re: alter table add more columns

2014-06-02 Thread Ashish Garg
No, you can add other partition column. you have to work with your current partitions. Best Regards. On Mon, Jun 2, 2014 at 5:17 PM, Mohammad Tariq wrote: > Yes. > > *Warm regards,* > *Mohammad Tariq* > *cloudfront.blogspot.com * > > > On Tue, Jun 3, 2014 at 2:08

Re: alter table add more columns

2014-06-02 Thread Mohammad Tariq
Yes. *Warm regards,* *Mohammad Tariq* *cloudfront.blogspot.com * On Tue, Jun 3, 2014 at 2:08 AM, Patcharee Thongtra < patcharee.thong...@uni.no> wrote: > Hi, > > Can I add a partition column? > > Patcharee > > > On 06/02/2014 10:25 PM, Mohammad Tariq wrote: > >

Re: Storing result of a query in a variable

2014-06-02 Thread Sanjay Subramanian
Add  -e option ./hive -e --hiveconf MY_VAR =`cat /tmp/result/00_0`; But u could use the following hdfs command as well MY_VAR=$(hdfs dfs -cat /tmp/result/00_0) thanks sanjay From: Chhaya Vishwakarma To: "user@hive.apache.org" Sent: Monday, June 2

Hadoop summit San Jose 5/3/14 - 5/5/14

2014-06-02 Thread Sanjay Subramanian
hi guys  I am going to attend the 3 day hadoop summit in San Jose tomorrow. Looking fwd to the Hive sessions. Hope to see many of u there. regards sanjay

Re: alter table add more columns

2014-06-02 Thread Patcharee Thongtra
Hi, Can I add a partition column? Patcharee On 06/02/2014 10:25 PM, Mohammad Tariq wrote: Hi Patcharee, You can definitely add new columns. This is how it is done : *ALTER TABLE table_name ADD|REPLACE COLUMNS (col_name data_type [COMMENT col_comment], ...)* For more info on Hive DDL you c

Re: alter table add more columns

2014-06-02 Thread Mohammad Tariq
Hi Patcharee, You can definitely add new columns. This is how it is done : *ALTER TABLE table_name ADD|REPLACE COLUMNS (col_name data_type [COMMENT col_comment], ...)* For more info on Hive DDL you can visit this link . *Warm

Data enclosed in Double quotes

2014-06-02 Thread Rahul Channe
Hi All, I have data enclosed in doubles quotes, is there a way in HIVE create table syntax to tell hive that data is enclosed in double quotes. in oracle we have - OPTIONALLY ENCLOSED "," Regards, Rahul

alter table add more columns

2014-06-02 Thread Patcharee Thongtra
Hi, I have a table named fino31 with the following schema hive> describe fino31; OK datetimestamp zoneint z int u float v float th float qv float ph

Re: java.lang.TypeNotPresentException: Type timestamp not present

2014-06-02 Thread Rahul Channe
Try loading the data in a temporary hive table with datatype as String, then you can populate the data in the final table insert into table timestamp_example select from_unixtime(unix_timestamp(v_time ,'MM/dd/ HH:mm') ) from timestamp_example_temp; On Mon, Jun 2, 2014 at 3:23 PM, Patcharee

java.lang.TypeNotPresentException: Type timestamp not present

2014-06-02 Thread Patcharee Thongtra
Hi, I am using hive 0.13 and I created a table with a column date in timestamp format. When I used pig script to store data into the table I got exception java.lang.TypeNotPresentException: Type timestamp not present This is my pig script result = FOREACH result_raw GENERATE generate ToDate(

Re: HDFS Overwriting undo

2014-06-02 Thread VinodKasam
Hi, The command to check if the file exists recursively is hadoop fs -lsr Vinod On Mon, Jun 2, 2014 at 12:40 AM, Amjad ALSHABANI wrote: > Hello Ashish, > > Unfortunately,I got this error when running the commande you provided: > > pns@app11:~$ hadoop fs -ls -lrt /user/hive/warehouse > -ls: Il

Re: HDFS Overwriting undo

2014-06-02 Thread Ashish Garg
hive -e "CREATE DATABASE my_stats LOCATION 'hdfs://:9000 */user/hive/warehouse/*mystats.db'" This command should be like as follows: hive -e 'Create Database my_stats' you do not need to specify the location because the default location of database is the warehouse directory. On Mon, Jun 2,

Re: HDFS Overwriting undo

2014-06-02 Thread Amjad ALSHABANI
I think it is worth to mention that I tried doing this before on locally deployed HDFS and it went well. So my question now, what has gone wrong with creation database with given location?? thanx for your rplies Amjad On Mon, Jun 2, 2014 at 9:50 AM, Siddharth Tiwari wrote: > Sorry Amzad, I

Re: HDFS Overwriting undo

2014-06-02 Thread Siddharth Tiwari
Sorry Amzad, I am afraid u can't Sent from my iPhone > On May 30, 2014, at 3:12 AM, "Amjad ALSHABANI" wrote: > > Hello Everybody, > > I know that this question may concern Hadoop list but i ve made this mistake > when using Hive. > I created new database giving the location on HDFS but i fo

Re: HDFS Overwriting undo

2014-06-02 Thread Amjad ALSHABANI
Hello Ashish, Unfortunately,I got this error when running the commande you provided: pns@app11:~$ hadoop fs -ls -lrt /user/hive/warehouse -ls: Illegal option -lrt Usage: hadoop fs [generic options] -ls [-d] [-h] [-R] [ ...] On Sun, Jun 1, 2014 at 8:17 PM, Ashish Garg wrote: > Try this comman

Storing result of a query in a variable

2014-06-02 Thread Chhaya Vishwakarma
Hi , I have a query whose result I wanted to store in a variable How can I do it ? I tried ./hive -e "use telecom;insert overwrite local directory '/tmp/result' select avg( a from abc;" ./hive --hiveconf MY_VAR =`cat /tmp/result/00_0`; I am able to get average value in MY_VAR but it take

Storing result of a query in a variable

2014-06-02 Thread Chhaya Vishwakarma
Hi , I have a query whose result I wanted to store in a variable How can I do it ? I tried ./hive -e "use telecom;insert overwrite local directory '/tmp/result' select avg( a from abc;" ./hive --hiveconf MY_VAR =`cat /tmp/result/00_0`; I am able to get average value in MY_VAR but it takes