HCatalog also allows us to write data to Hive tables from Java MapReduce computations using the HCatOutputFormat
. In this recipe, we'll be looking at how to write data to a Hive table using a Java MapReduce computation. This recipe extends the computation of the previous HCatalog – performing Java MapReduce computations on data mapped to Hive tables recipe by adding table write capability.
This section demonstrates how to write data to a Hive table using a MapReduce computation. Perform the following steps:
Follow the Hive batch mode – using a query file recipe of this chapter to create and populate the user Hive table that we'll be using in this recipe.
Compile the sample source code for this chapter by running the following
gradle
command from thechapter6
folder of the source repository:$ gradle clean build uberjar
Use Hive CLI to create...