- 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 - in hive when the schema does not match the file content
B - It reads only the string data type
Answer : D
Explanation
Instead of returning error, Hive returns null values for mismatch between schema and actual data.
Q 2 - The difference between the MAP and STRUCT data type in Hive is
A - MAP is Key-value pair but STRUCT is series of values
C - The Keys in MAP can not be integers but in STRUCT they can be.
Answer : D
Explanation
Each element in MAP type should be of same data type but in STRUCT it need not be so.
Q 3 - To see the data types details of only a column (not the table) we should use the command
Answer : A
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 property set to run hive in local mode as true so that it runs without creating a mapreduce job is
B - hive.exec.mode.local.override
Answer : A
Explanation
In local mode hive will not trigger a mapreduce job.
Q 6 - what can be altered about a view
Answer : C
Explanation
TBLPROPERTIES stores some documentation about the table like created date time etc.
Q 7 - The identifiers in HiveQL are
Answer : A
Explanation
Hive is case insensitive
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 - Aggregate functions in Hive are the function which
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 : B
Explanation
Examples functions are − count, avarege etc.
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.