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

Add SymlinkTextInputFormat to Hive

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.6.0
    • Metastore, Query Processor
    • None
    • Reviewed

    Description

      We'd like to add a symlink text input format so that we can specify the list of files for a table/partition based on the content of a text file.

      For example, the location of the table is "/user/hive/mytable".
      There is a file called "/user/hive/mytable/myfile.txt".
      Inside the file, there are 2 lines, "/user/myname/textfile1.txt" and "/user/myname/textfile2.txt"

      We can do:

      CREATE TABLE mytable (...) STORED AS INPUTFORMAT 'org.apache.hadoop.hive.io.SymlinkTextInputFormat' LOCATION '/user/hive/mytable';
      SELECT * FROM mytable;
      

      which will return the content of the 2 files: "/user/myname/textfile1.txt" and "/user/myname/textfile2.txt"

      Attachments

        1. HIVE-1272.1.patch
          15 kB
          Guanghao Shen
        2. HIVE-1272.2.patch
          24 kB
          Guanghao Shen

        Activity

          People

            sghao Guanghao Shen
            zshao Zheng Shao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: