
- Hive - Home
- Hive - Introduction
- Hive - Installation
- Hive - Data Types
- Hive - Create Database
- Hive - Drop Database
- Hive - Create Table
- Hive - Alter Table
- Hive - Drop Table
- Hive - Partitioning
- Hive - Built-In Operators
- Hive - Built-In Functions
- Hive - Views And Indexes
- Hive Useful Resources
- Hive - Questions and Answers
- Hive - Quick Guide
- Hive - Useful Resources
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.

Q 1 - The results of a hive query can be stored as
Answer : C
Explanation
Using the command INSERT OVERWRITE DITECTORY .. data can be exported to both local and hdfs file system.
Q 2 - The tables created in hive are stored as
A - a subdirectory under the database directory
B - a file under the database directory
Answer : A
Explanation
Each database becomes a directory and each table becomes a file in that directory
Q 3 - SerDe
A - parses records to columns while reading and columns to records when writing
B - parses records to columns while writing and columns to records when reading
C - creates partitions from columns using each of the records
Answer : A
Explanation
Converting records to columns is serializing and the reverse is Deerializing
Q 4 - While querying a hive table for a column with MAP data type, the elements in the column are referenced by
Answer : B
Explanation
The MAP data type is a key-value pair and not index based.
Q 5 - The CONCAT string function in Hive can concatenate
Answer : C
Explanation
CONCAT function accepts any number of arguments
Q 6 - The DISTRIBUTED by clause is used to ensure that
A - similar values go to the same reducer
B - similar values go to same mapper
C - similar values are distributed evenly across all the reducers
D - similar values are distributed evenly across all the mapers
Answer : A
Explanation
The DISTRIBUTED BY clause send a range of values to the same reducer.
Q 7 - If the data on the table on which an index is defined changes then,
B - The index rebuilds automatically
Answer : C
Explanation
Hive does not manage the Index like RDBMS. SO it has to be built manually.
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
Answer : B
Explanation
This property decides the number files to be looked into for the sample result.
Q 9 - A standard user-defined function (UDF) refers to any function that
A - Takes one or more columns form a row and returns a single value
B - Takes one or more columns form many rows and returns a single value
C - Take zero or more inputs and produce multiple columns or rows of output
D - Detects the type of input programmatically and provides appropriate response
Answer : A
Explanation
Examples functions are concat, reverse etc.
Q 10 - The MACRO created in Hive has the ability to
A - Run multiple functions on same set of data automatically
Answer : B
Explanation
Macros are created for the purpose of calling other functiuons