Hive Online Quiz


Advertisements

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

Partitioning creates subdirectories and only those subdirectories are read to fetch the query result, improving the performance.

Q 4 - While querying a hive table for a column with MAP data type, the elements in the column are referenced by

A - Index

B - Key

C - Value

D - nested Index

Answer : B

Explanation

The MAP data type is a key-value pair and not index based.

Q 5 - The clause used to limit the number of rows returned by a query is

A - LIMIT

B - ROWNUM

C - RESTRICT

D - MAXROW

Answer : A

Explanation

LIMIT restricts the number of rows returned by a query.

Q 6 - A view in Hive can be seen by using

A - SHOW TABLES

B - SHOW VIEWS

C - DESCRIBE VIEWS

D - VIEW VIEWS

Answer : A

Explanation

There is no separate clause for viewing views. It is shown using show tables.

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 : D

Explanation

All the listed filesystem can be accessed using UDF

hive_questions_answers.htm
Advertisements