- 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 - On dropping a managed table
A - The schema gets dropped without dropping the data
Answer : D
Explanation
As it is hive managed table both the data and schema definition are dropped.
Q 3 - To see the partitions present in a Hive table the command used is
Answer : B
Explanation
SHOW PARTTIONS table_name
Q 4 - While querying a hive table for a Array type column, if the array index is nonexistent then
Answer : A
Explanation
Hive returns NULL while in java it would have returned index out of bound error
Q 5 - The clause used to limit the number of rows returned by a query is
Answer : A
Explanation
LIMIT restricts the number of rows returned by a query.
Q 6 - The DISTRIBUTED BY clause in hive
A - comes Before the sort by clause
B - comes after the sort by clause
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.
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 - Intermediate compression in Hive is about
A - Compressing the data just before it is read by mapreduce task
B - Compressing the data just before it is output to the user
C - Compressing the data before it is stored by into the disk
D - Compressing the data shuffled between the map and reduce tasks
Answer : D
Explanation
Data compression between map and reduce task is called intermediate compression.
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 - Calling a unix bash script inside a Hive Query is an example of
Answer : D
Explanation
In this type of streaming the code resides in the script being called and Hive is not aware of the code.