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

Support creating table from a file schema: CREATE TABLE ... LIKE <file_format> '/path/to/file'

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.2.0
    • None
    • Query Processor
    • None

    Description

      It would be useful if Hive could infer the column definitions in a create table statement from the underlying data file. For example:

      CREATE TABLE new_tbl LIKE PARQUET '/path/to/file.parquet';

      If the targeted file is not the specified file format, the statement should fail analysis. In addition to PARQUET, it would be useful to support other formats such as AVRO, JSON, and ORC.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lskuff Lenni Kuff
              Votes:
              7 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated: