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
<https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions>,
particularly the Limitations
<https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions#HiveTransactions-Limitations>
 section?

-- Lefty

On Tue, Oct 27, 2015 at 1:02 AM, AnandaVelMurugan Chandra Mohan <
ananthu2...@gmail.com> wrote:

> 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
> http://unmeshasreeveni.blogspot.in/2014/11/updatedeleteinsert-in-hive-0140.html.
> This suggests changing hive configurations which are not possible
> immediately. Is there anything else which you can suggest?
>
> Regards,
> Anand
>
>
> On Tue, Oct 27, 2015 at 9:00 AM, Lefty Leverenz <leftylever...@gmail.com>
> wrote:
>
>> Your table has to support transactions (see Inserting values into tables
>> from SQL
>> <https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-InsertingvaluesintotablesfromSQL>),
>> so create it with the TBLPROPERTIES clause
>> <https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions#HiveTransactions-TableProperties>
>> :
>>
>> CREATE TABLE tmp (reporttime timestamp) TBLPROPERTIES
>> ("transactional"="true");
>>
>> Unfortunately the examples in Inserting values into tables from SQL
>> <https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-InsertingvaluesintotablesfromSQL>
>>  don't
>> show the TBLPROPERTIES clause -- that needs to be fixed in the wiki.
>>
>> -- Lefty
>>
>>
>> On Mon, Oct 26, 2015 at 8:49 PM, AnandaVelMurugan Chandra Mohan <
>> ananthu2...@gmail.com> wrote:
>>
>>> 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 INTO TABLE tmp VALUES(734196.3552);
>>>
>>> INSERT INTO TABLE tmp VALUES(734196);
>>>
>>> I read that values of timestamp could be integers which are interpreted
>>> as seconds since unix epoch time or float which are interpreted as seconds
>>> since unix epoch time with nanasecond precision or string of format
>>> 'YYYY-mm-dd'. I cannot use third string option as of now. So I am trying
>>> other two options i.e. int and float.
>>>
>>> When I do a select query, I get null
>>>
>>> I tried
>>>
>>> select to_date(reporttime) from tmp
>>> select reporttime from tmp
>>>
>>> Please help if you have any idea.
>>> --
>>> Regards,
>>> Anand
>>>
>>
>>
>
>
> --
> Regards,
> Anand
>

Reply via email to