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

Explanation

As it is hive managed table both the data and schema definition are dropped.

Answer : B

Explanation

Partitions of a table creates more subdirectories under it.

Q 4 - If the schema of the table does not match with theĀ  data types present in the file containing the table then HIve

A - Automatically drops the file

B - Automatically corrects the data

C - Reports Null values for mismatched data

D - Does not allow any query to run on the table

Answer : C

Explanation

Hive always tries to read the data as it is Schema on Read.

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;

Answer : A

Explanation

Hive is case insensitive

Answer : C

Explanation

When files are not splitable , querying them becomes inefficient.

Q 9 - The explode() function in hive takes an array of input and iterates through it returning each element as a separate row. This is an example of

A - Standard UDF

B - Aggregate UDF

C - Table Generating UDF

D - None

Answer : C

Explanation

SELECT explode(array(1,2,3)) AS element FROM src;

gives
1
2
3
so it is table generating function

Q 10 - Calling a unix bash script inside a Hive Query is an example of

A - Hive Pipeline

B - Hive Caching

C - Hive forking

D - Hive Streaming

Answer : D

Explanation

In this type of streaming the code resides in the script being called and Hive is not aware of the code.

hive_questions_answers.htm
Advertisements