Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-4735

table's lifecycle should be controlled in Hive

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Example as:
      – create table src,and set it's lifecycle as 100 days
      – alter 100 days the table will be dropped automatically
      CREATE TABLE src (key string, value string) TBLPROPERTIES ('LIFECYCLE'='100d');

      – alter table src and reset it's lifecycle as 50 day
      – alter 50 days the table will be dropped automatically
      ALTER TABLE src SET TBLPROPERTIES('LIFECYCLE'='50d');

      – alter specific table partition's lifecycle
      – we have DBPROPERTIES and TBLPROPERTIES , but seems we do not have 'PRTPROPERTIES'
      ALTER TABLE srcpart PARTITION (dt='20130614',hr='10') SET PRTPROPERTIES('LIFECYCLE'='50d');

      Attachments

        Activity

          People

            Unassigned Unassigned
            caofangkun caofangkun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: