- 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 - Users can pass configuration information to the SerDe using
Answer : B
Explanation
This feature of SrrDe is used to customize Hive for a wide range of file formats
Q 4 - If the schema of the table does not match with the data types present in the file containing the table then HIve
A - Automatically drops the file
B - Automatically corrects the data
Answer : C
Explanation
Hive always tries to read the data as it is Schema on Read.
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 - 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 - Which of the following feature is used to analyze the query execution plan
Answer : C
Explanation
EXPLAIN is used to analyze the query execution plan.
Q 8 - Which of the following hint is used to optimize the join queries
A - /* joinlast(table_name) */
B - /* joinfirst(table_name) */
Answer : C
Explanation
Streaming a table of small size makes the query faster.
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 - The UDF can access files inside
Answer : D
Explanation
All the listed filesystem can be accessed using UDF