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

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

A - describe

B - show

C - describe extended

D - show extended

Answer : C

Explanation

The DESCRIBE EXTENDED command gives all the details

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 clause used to limit the number of rows returned by a query is

A - LIMIT

B - ROWNUM

C - RESTRICT

D - MAXROW

Answer : A

Explanation

LIMIT restricts the number of rows returned by a query.

Answer : A

Explanation

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

Answer : A

Explanation

The query is run on complete data set and then the results are restricted using LIMIT clause.

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 command to list the functions currently loaded in a Hive Session is

A - LIST FUNCTIONS

B - SHOW FUNCTIONS

C - DECSRIBE FUNCTIONS

D - FIND FUNCTIONS

Answer : B

Explanation

SHOW FUNCTIONS produces list of all the functions currently available in hive session

Answer : D

Explanation

All the listed filesystem can be accessed using UDF


hive_questions_answers.htm

Advertisements