Difference between 'Stored as InputFormat, OutputFormat' and 'Stored as' in Hive

前端 未结 2 2332
情书的邮戳
情书的邮戳 2021-02-20 10:31

Issue when executing a show create table and then executing the resulting create table statement if the table is ORC.

Using sho

2条回答
  •  粉色の甜心
    2021-02-20 10:58

    You сan specify INPUTFORMAT, OUTPUTFORMAT, SERDE in STORED AS when creating table. Hive allows you to separate your record format from your file format. You can provide custom classes for INPUTFORMAT, OUTPUTFORMAT, SERDE. See details: http://www.dummies.com/programming/big-data/hadoop/defining-table-record-formats-in-hive/

    Alternatively you can write simply STORED AS ORC or STORED AS TEXTFILE for example. STORED AS ORC statement already takes care about INPUTFORMAT, OUTPUTFORMAT and SERDE. This allows you not to write those long fully qualified Java class names for INPUTFORMAT, OUTPUTFORMAT, SERDE. Just STORED AS ORC instead.

提交回复
热议问题