Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

I would like a move hive orc data into a archival directory(certain location) based on date range.

I would like a move hive orc data into a archival directory(certain location) based on date range.

Rising Star

I have hive data with ORC format, and there is a data column on which we are doing partitioned and i would like to move the data to archival directory based on partitioned column name date and if it 30 days older.

1 REPLY 1

Re: I would like a move hive orc data into a archival directory(certain location) based on date rang

Champion

You should try something like this I have not tested it. 

INSERT OVERWRITE TABLE TEST
PARTITION( DATE)
Select cols where 
Date_sub(FROM_UNIXTIME(UNIX_TIMESTAMP()), 30) 
Don't have an account?
Coming from Hortonworks? Activate your account here