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 - Using the ALTER DATABASE command in an database you can change the

A - database name

B - database creation time

C - dbproperties

D - directory where the database is stored

Answer : C

Explanation

only dbproperties are changed through this command

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.

Answer : C

Explanation

CONCAT function accepts any number of arguments

Answer : A

Explanation

Sorting as the last clause will be efficient as that is also the last step in the reduce job producing the output.

Answer : A

Explanation

As external table data is managed by other applications hive does not create index on them.

Answer : D

Explanation

Data compression between map and reduce task is called intermediate compression.

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