- 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 - What Hive can not offer
A - storing data in tables and columns
Answer : B
Explanation
Hive is suited for effectively organizing and querying the store data and not inserting/updating data which is required for OLTP.
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 - Creating a table an loading it with a select clause in one query applies to
Answer : A
Explanation
Only a internal table can be created and loaded with data using one query.
Answer : D
Explanation
STRUCT elements are key-value pairs and the elements are accessed by dot notation.
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 - When importing data to using SerDe, if a row is found to have more columns than expected then
A - The extra columns are replaced with NULL
Answer : D
Explanation
Hive is schema on Read and It does not throw error for mismatch between schema and actual data.
Q 8 - Which of the following scenarios are not prevented by enabling strict mode in Hive?
A - Scanning all the partitions
B - Generating random sample of data
Answer : B
Explanation
The other three scenarios create long running job. So STRICT mode is applied to them.
Q 9 - The reverse() function reverses a string passed to it in a Hive query. This is an example of
Answer : A
Explanation
reverse(abcd) gives dcba. So it is a standard UDF.
Q 10 - The Hive metadata can be easily created and edited using
Answer : A
Explanation
Hcatalog stores metadata information for many Hadoop tools like Hive and Mapreduce. It can be accessed through a web interface.