creating partition in external table in hive

后端 未结 4 1334

I have successfully created and added Dynamic partitions in an Internal table in hive. i.e. by using following steps:

1-created a sourc

4条回答
  •  半阙折子戏
    2021-02-03 11:43

    1. Set below property

    set hive.exec.dynamic.partition=true

    set hive.exec.dynamic.partition.mode=nonstrict

    2. Create External partitioned table

    create external table1 ( name string, age int, height int) location 'path/to/dataFile/in/HDFS';

    3. Insert data to partitioned table from source table.

    Basically , the process is same. its just that you create external partitioned table and provide HDFS path to table under which it will create and store partition.

    Hope this helps.

提交回复
热议问题