Following quiz provides Multiple Choice Questions (MCQs) related to Hive. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - The partition of an Indexed table is dropped. then,
As indexes are defined on a table, the removal of table partition also removes the respective index.
Q 2 - The tables created in hive are stored as
Each database becomes a directory and each table becomes a file in that directory
Q 3 - To see the partitions present in a Hive table the command used is
SHOW PARTTIONS table_name
Q 4 - Partitioned can be prevented from being
using the ALTER TABLE…….. ENABLE NO_DROP & ENABLE OFFLINE clause.
Q 5 - The property set to run hive in local mode as true so that it runs without creating a mapreduce job is
In local mode hive will not trigger a mapreduce job.
Q 6 - The query
Create table TABLE_NAME LIKE VIEW_NAME
A table can be created form a view
Q 7 - Consider the below two sets of queries.
Query A: hive> INSERT OVERWRITE TABLE sales SELECT * FROM history WHERE action = 'purchased'; hive> INSERT OVERWRITE TABLE credits SELECT * FROM history WHERE action = 'returned'; and Query B: hive> FROM history INSERT OVERWRITE sales SELECT * WHERE action = 'purchased' INSERT OVERWRITE credits SELECT * WHERE action = 'returned'
Which of them will make a single pass through?
in Query B, the query is executed only once.
Q 8 - Which of the following scenarios are not prevented by enabling strict mode in Hive?
The other three scenarios create long running job. So STRICT mode is applied to them.
Q 9 - The reverse() function reverses a string passed to it in a Hive query. This is an example of
reverse(‘abcd’) gives ‘dcba’. So it is a standard UDF.
Q 10 - When one of the join tables is small enough to fit into memory, The type of join used by Hive is
As one of the tables already fits into the memory each row of the big table is quickly compared with each row of small table using Map Join.