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

Answer : A

Explanation

The schema only refers to the data stored and data is not validated against schema when inserted or loaded.

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

Partitions of a table creates more subdirectories under it.

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 - When a Hive query joins 3 tables, How many mapreduce jobs will be started?

A - 1

B - 2

C - 3

D - 0

Answer : B

Explanation

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 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.

Q 7 - What is the disadvantage of using too many partitions in Hive tables?

A - It slows down the namenode

B - Storage space is wasted

C - Join quires become slow

D - All of these

Answer : D

Explanation

Too many partitions create too many files and too much metadata to be stored by namenode.

Answer : C

Explanation

Streaming a table of small size makes the query faster.

Q 9 - Which of the below is not a type compression option for Sequence file

A - RECORD

B - BLOCK

C - COLUMN

D - NONE

Answer : C

Explanation

There is no COLUMN compression type for a sequence file

Answer : B

Explanation

Functionregistry holds the list of all permanent functions


hive_questions_answers.htm

Advertisements
E-Books Store