
- Hive Tutorial
- 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
- HiveQL
- HiveQL - Select Where
- HiveQL - Select Order By
- HiveQL - Select Group By
- HiveQL - Select Joins
- Hive Useful Resources
- Hive - Questions and Answers
- Hive - Quick Guide
- Hive - Useful Resources
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 query "SHOW DATABASE LIKE 'h.*' ; gives the output with database name
Answer : B
Explanation
Hive support regular expressions which are derived from regex capabilities of Java language.
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 keys present in a Hive table the command used is
Answer : C
Explanation
The DESCRIBE EXTENDED command gives all the details
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 - Consider the query SELECT explode(city_locality) from ALL_LOCALITIES , where city_locality is a ARRAY dat atype. This will return
A - all th array elements as one row for each input array
B - zero or more rows, for each element for each input array
C - Each of the array element as one column for each input array
D - zero ormore columns for each element for each input array
Answer : B
Explanation
The explode() function expands each element of ARRAY into a row.
Q 6 - Which kind of keys(CONSTRAINTS) Hive can have?
Answer : D
Explanation
Hive is schema on read and unlike RDBMS it does not have a way to enforce the existence of keys.
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 - The disadvantage of compressing files in HDFS is
Answer : C
Explanation
When files are not splitable , querying them becomes inefficient.
Q 9 - A Table Generating Function is a 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 : C
Explanation
Examples functions is Explode()
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