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 - The default delimiter in hive to separate the element in STRUCT is

A - '\001'

B - '\oo2'

C - '\oo3'

D - '\oo4'

Answer : B

Explanation

The four default delimiters are − \n for record separator,

001\ for field separator

002\ for element separator in ARRAY or STRUCT

003\ for element separator in MAP

Answer : A

Explanation

Copying data is done by OS commands and not Hive

Q 3 - To see the partitions present in a Hive table the command used is

A - Describe

B - show

C - describe extended

D - show extended

Answer : B

Explanation

SHOW PARTTIONS table_name

Answer : B

Explanation

The LOCAL clause only copies without moving the files.

Q 5 - For optimizing join of three tables, the largest sized tables should be placed as

A - the first table in the join clause

B - second table in the join clause

C - third table in the join clause

D - Does not matter

Answer : C

Explanation

Hive reads the tables from left to right. Small tables should be read first and if possible cached into the memory.

Answer : A

Explanation

The DISTRIBUTED BY clause send a range of values to the same reducer.

Answer : C

Explanation

Hive does not manage the Index like RDBMS. SO it has to be built manually.

Answer : C

Explanation

When files are not splitable , querying them becomes inefficient.

Q 10 - When one of the join tables is small enough to fit into memory, The type of join used by Hive is

A - Inner Join

B - Map join

C - Reduce Join

D - Sort Join

Answer : B

Explanation

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.

hive_questions_answers.htm
Advertisements