Hive loading in partitioned table

前端 未结 5 628
长发绾君心
长发绾君心 2020-12-05 05:20

I have a log file in HDFS, values are delimited by comma. For example:

2012-10-11 12:00,opened_browser,userid111,deviceid222

Now I want to load

5条回答
  •  心在旅途
    2020-12-05 06:03

    I worked this very same scenario, but instead, what we did is create separate HDFS data files for each partition you need to load.

    Since our data is coming from a MapReduce job, we used MultipleOutputs in our Reducer class to multiplex the data into their corresponding partition file. Afterwards, it is just a matter of building the script using the Partition from the HDFS file name.

提交回复
热议问题