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 - The results of a hive query can be stored as

A - local file

B - hdfs file

C - both

D - can not be stored

Answer : C

Explanation

Using the command INSERT OVERWRITE DITECTORY ….. data can be exported to both local and hdfs file system.

Answer : A

Explanation

Each database becomes a directory and each table becomes a file in that directory

Answer : B

Explanation

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

Q 4 - When the result of the STRING data type is returned by querying array data type using index, the result have

A - no quotes

B - double suotes

C - single quotes

D - No spaces

Answer : A

Explanation

The STRINGS returned form ARRAYS will not contain the quotes.

Q 5 - An element in a STRUCT column in hive is referred by

A - index

B - key

C - colon

D - dot

Answer : D

Explanation

STRUCT elements are key-value pairs and the elements are accessed by dot notation.

Q 6 - The Index in Hive can be seen by

A - Describe Index

B - Show Index

C - View Index

D - Find Index

Answer : B

Explanation

Similar to show tables, Indexes can be queried by SHOW Index.

Answer : A

Explanation

Hive is case insensitive

Q 8 - The Property that decides what is the maximum number of files that can be sampled during the use of the LIMIT clause is

A - hive.limit.optimize.file.max

B - hive.limit.optimize.limit.file

C - hive.limit.optimize.file.restrict

D - hive.limit.optimize.limit.most

Answer : B

Explanation

This property decides the number files to be looked into for the sample result.

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 - A user creates a UDF which accepts arguments of different data types, each time it is run. It is an example of

A - Aggregate Function

B - Generic Function

C - Standard UDF

D - Super Functions

Answer : B

Explanation

Generic functions are created as java programs and can accept variable data types.

hive_questions_answers.htm
Advertisements