In addition to the Hive interactive CLI, Hive also allows us to execute our queries in the batch mode, using a script file. In this recipe, we use a Hive script file to create books, users, and ratings tables of the Book-Crossing dataset and to load the data into the newly created tables.
This section demonstrates how to create tables and load data using a Hive script file. Proceed with the following steps:
$ tar –zxvf chapter6-bookcrossing-data.tar.gz
create-book-crossing.hqlHive query file in the Hive-scripts folder of the source repository for this chapter. Execute this Hive script file as follows by providing ...