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 query "SHOW DATABASE LIKE 'h.*' ; gives the output with database name
Hive support regular expressions which are derived from regex capabilities of Java language.
Q 2 - In Hive you can copy
Copying data is done by OS commands and not Hive
Q 3 - If the directory for a partition does not exist, and a query is executed for this partition then
The map reduce job is triggered but no result will be returned.
Q 4 - Partitioned can be prevented from being
using the ALTER TABLE…….. ENABLE NO_DROP & ENABLE OFFLINE clause.
Q 5 - When a Hive query joins 3 tables, How many mapreduce jobs will be started?
Hive cerates one mapreduce job for the first pair of tables and second pair of tables with one table common between both the pairs.
Q 6 - A View in Hive can be dropped by using
DROP view drops the 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 - Hive can automatically decide to run local mode by setting which of the following parameters in hive-site.xml?
This parameter is used to set local mode.
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 - Which of the following File Formats are supported by Hive?
Hive supports all these three file formats as they are also supported by Hadoop in general