Hive Online Quiz



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.

Questions and Answers

Q 1 - Which of the following is not a complex  data type in Hive?

A - Matrix

B - Array

C - Map

D - STRUCT

Answer : A

Explanation

There is no Matrix data type in Hive.

Q 2 - If the database contains some tables then it can be forced to drop without dropping the tables by using the keyword

A - RESTRICT

B - OVERWRITE

C - F DROP

D - CASCADE

Answer : D

Explanation

CASCADE clause drops the table first before dropping the database

Answer : B

Explanation

It is a program to read and write files using Java Input and Output formats.

Q 4 - If we change the partition location of a hive table using ALTER TABLE option then the data for that partition in the table

A - also moves automatically to the new location

B - has to be dropped and recreated

C - has to  be backed up into a second table and restored

D - has to be moved manually into new location

Answer : D

Explanation

Data is independent of schema in Hive.

Q 5 - The performance of an aggregate query is improved by setting which of the following property as true?

A - hive.map.group

B - hive.map.aggr

C - hive.map.sort

D - hive.map.sum

Answer : B

Explanation

SET hive.map.aggr = true;

Q 6 - A View in Hive can be dropped by using

A - DROP TABLE

B - DROP VIEW

C - DELETE VIEW

D - REMOVE VIEW

Answer : B

Explanation

DROP view drops the view.

Answer : D

Explanation

AN index can be dropped only after dropping the table on which index is created.

Q 8 - The default limit to the number of rows returned by a query can be done using which of the following parameter?

A - hive.limit.optimize.enable

B - hive.limit.enable.optimize

C - hive.optimize.enable.limit

D - hive.enable.limit.optimize

Answer : A

Explanation

This parameter is configured to change the default value of the number of rows returned

Answer : B

Explanation

This property controls the logging in Mapreduce tasks

Answer : B

Explanation

Macros are created for the purpose of calling other functiuons

hive_questions_answers.htm
Advertisements