Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

sub days from temp column date value

avatar
New Contributor

im trying to substract 73 days from the 'today' column value below is what i have,

but it wont work. i got error msg "semanticexception[error]17980: operation is not supported. Table is not acid neither maprbjson.

How can i get this done pls

this is what i tried

create temp table myvv(taday date, rdf date, alert date)

insert into(today) select '2019-07-20;

update myvv set rdf = date_sub(today, 73)

column 'today' hold value date '2019-07-20' which ran successfully Im expecting: to substract 73 days from the 'today' column value

Expected result : column rdf , result 2019-05-08

1 REPLY 1

avatar
Master Collaborator

Which version are you on? Is this Cloudera Hive distribution?  I think UPDATE command is not working because it is not an acid(transactional) table. For update command to work, it has to be an ACID table. @roti