Hive allows us to save the output data of Hive queries by creating new Hive tables. We can also insert the resultant data of a Hive query into another existing table as well.
Install Hive and follow the Creating databases and tables using Hive CLI recipe.
The following steps show you how to store the result of a Hive query into a new Hive table:
hive> CREATE TABLE tmp_users AS SELECT user_id, location, age FROM users WHERE age>18 and age <34; … Table bookcrossing.tmp_users stats: [num_partitions: 0, num_files: 1, num_rows: 0, total_size: ...