Hi,
     Finally i updated and deleted from hive table.we need to create table
with transactional = true like following.

create table test(id int, name varchar(128)) clustered by (id) into 2
buckets stored as orc TBLPROPERTIES ('transactional'='true')
insert into table test values(1,'Mahesh');
update test set name='Raj' where id=1;
delete from test where name='Raj';

Cheers,

Mahesh.S


On Tue, Nov 4, 2014 at 1:52 PM, mahesh kumar <sankarmahes...@gmail.com>
wrote:

> Hi Nitin,
>            I created table with ORC format when i update it shows the
> following error.
> CREATE TABLE students (name VARCHAR(64), age INT, gpa DECIMAL(3, 2))
> CLUSTERED BY (age) INTO 2 BUCKETS STORED AS ORC;
>
> INSERT INTO TABLE students VALUES ('fred flintstone', 35, 1.28), ('barney
> rubble', 32, 2.32);
>
> hive> update students set age='12' where name='barney rubble';
>
> FAILED: SemanticException [Error 10122]: Bucketized tables do not support
> INSERT INTO: Table: default.students
>
> Thanks,
> Mahesh.S
>
>
> On Tue, Nov 4, 2014 at 1:28 PM, Nitin Pawar <nitinpawar...@gmail.com>
> wrote:
>
>> currently only ORCFileformat is supports ACIDOutputformat
>>
>> So you may want to create a table with orcfile format and see if you are
>> able to do acid opertaions.
>>
>>
>>
>> On Tue, Nov 4, 2014 at 1:14 PM, mahesh kumar <sankarmahes...@gmail.com>
>> wrote:
>>
>>> Hi Nitin,
>>>
>>>              how to create table with AcidOuptut Format.?Can you send me
>>> examples.
>>>
>>> Thanks
>>> Mahesh
>>>
>>> On Tue, Nov 4, 2014 at 12:21 PM, Nitin Pawar <nitinpawar...@gmail.com>
>>> wrote:
>>>
>>>> As the error says, your table file format has to be AcidOutPutFormat or
>>>> table needs to be bucketed to perform update operation.
>>>>
>>>> You may want to create a new table from your existing table with
>>>> AcidOutPutFormat and insert data from current table to that table and then
>>>> try update op on new table
>>>>
>>>> On Tue, Nov 4, 2014 at 12:11 PM, mahesh kumar <sankarmahes...@gmail.com
>>>> > wrote:
>>>>
>>>>> Hi ,
>>>>>        Is anyone tried hive 0.14 configuration.I built it using maven
>>>>> from github.
>>>>> Insert is working fine but when i use update/delete i got the
>>>>>  error.First i created table and inserted rows.
>>>>>
>>>>> CREATE  TABLE new(id int ,name string)ROW FORMAT DELIMITED FIELDS
>>>>> TERMINATED BY ',';
>>>>>  insert into table new values ('1','Mahesh');
>>>>>
>>>>> update new set name='Raj' where id=1;
>>>>>
>>>>> FAILED: SemanticException [Error 10297]: Attempt to do update or
>>>>> delete on table default.new that does not use an AcidOutputFormat or is 
>>>>> not
>>>>> bucketed.
>>>>>
>>>>> When i update the table i got the above error.
>>>>>
>>>>> Can you help me guys.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Mahesh.S
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Nitin Pawar
>>>>
>>>
>>>
>>
>>
>> --
>> Nitin Pawar
>>
>
>

Reply via email to