Question: I need help in writing Hive command for these questions: Assume that we have four data files named: action, thriller, comedy and action_comedy_thriller in our
I need help in writing Hive command for these questions:
Assume that we have four data files named: action, thriller, comedy and action_comedy_thriller in our HDFS. All the files have movies id, movie name and the action_thriller_comedy file have the genre: Action, Comedy and Thriller for each movie.
1. create table called movies_whole with 3 columns (movieid, movie_name, genre)
2. load action_comedy_thriller file into table
3. create a table called movies_part with 2 columns (movieid, movie_name) that is partitioned on genre.
4. load each file (action, comedy, and thriller) into a partitions ("Action", "Comedy", and "Thriller")
5. describe the structure of the table and list the partitions (hint: describe and show partitions command)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
