Re: insert timestamp values in Hive

2015-10-28 Thread AnandaVelMurugan Chandra Mohan
Hi, I tried the following and it worked fine. create table foo (x int); insert into foo values (5); select * from foo; But when I try the following, I get NULL create table bar(x timestamp); insert into bar values (500); select * from bar; Regards, Anand On Tue, Oct 27, 2015 at 9:15 PM, Alan

Re: insert timestamp values in Hive

2015-10-27 Thread Lefty Leverenz
Oh, right -- I forgot that the table has to be bucketed and use ORC format, and several configuration parameters need to be set appropriately. Have you read Hive Transactions , particularly the Limitations

Re: insert timestamp values in Hive

2015-10-27 Thread Srinivas Thunga
Hi, If you want those properties to executed, then you need to create table in ORC format and need to change some configuration on Hive-Site.xml Regards, Srinivas T *Thanks & Regards,* *Srinivas T* On Tue, Oct 27, 2015 at 12:05 PM, Lefty Leverenz wrote: > Oh, right

Re: insert timestamp values in Hive

2015-10-27 Thread AnandaVelMurugan Chandra Mohan
Hi, Thanks for the suggestions. I was planning to parquet format. I will read about transactions fully before proceeding. Regards, Anand On Tue, Oct 27, 2015 at 12:19 PM, Srinivas Thunga wrote: > Hi, > > If you want those properties to executed, then you need to

Re: insert timestamp values in Hive

2015-10-27 Thread Alan Gates
Actually, for INSERT VALUES you don't have to have a transactional table (you do to use UPDATE or DELETE). So I would expect this to work as is. What happens if you do: create table foo (x int); insert into foo values (5); select * from foo; Do you get 5 or null? This will tell whether the

insert timestamp values in Hive

2015-10-26 Thread AnandaVelMurugan Chandra Mohan
Hi, I believe my Hive version is Apache 1.2.0. I guessed it from the folder and hive-hwi.jar names. I am trying to insert values into a column of type timestamp. It does not work This is how I create the table CREATE TABLE tmp (reporttime timestamp); I tried following insert queries INSERT

Re: insert timestamp values in Hive

2015-10-26 Thread Lefty Leverenz
Your table has to support transactions (see Inserting values into tables from SQL ), so create it with the TBLPROPERTIES clause

Re: insert timestamp values in Hive

2015-10-26 Thread AnandaVelMurugan Chandra Mohan
Hi, Thanks for your suggestion. I tried this and I get the following error "Attempt to do update or delete on table tmp that does not use an AcidOutputFormat or is not bucketed". I googled about it and found this link