- 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
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 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 - 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 performance of an aggregate query is improved by setting which of the following property as true?
Answer : B
Explanation
SET hive.map.aggr = true;
Q 6 - A view in Hive can be seen by using
Answer : A
Explanation
There is no separate clause for viewing views. It is shown using show tables.
Q 7 - Indexes can be created
Answer : A
Explanation
As external table data is managed by other applications hive does not create index on them.
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 - To add a new user defined Function permanently to Hive, we need to
A - Create a new version of HIve
B - Add the .class Java code to FunctionRegistry
Answer : B
Explanation
Functionregistry holds the list of all permanent functions
To Continue Learning Please Login
Login with Google