How to convert .txt / .csv file to ORC format

后端 未结 2 1937
花落未央
花落未央 2020-12-31 22:33

For some requirement I want to convert text file(delimited) to ORC(Optimized Row Columnar) format. As I have to run it in regular intervals

2条回答
  •  一向
    一向 (楼主)
    2020-12-31 22:54

    You can insert text data into a orc table by such command:

    insert overwrite table orcTable select * from textTable;
    

    The first table is orcTable is created by the following command:

    create table orcTable(name string, city string) stored as orc;
    

    And the textTable is as the same structure as orcTable.

提交回复
热议问题