- 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 - 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 loading data into managed tables, If the LOCAL clause is mentioned, it
A - Moves the data from local filesystem to the target files system
B - Copies the data from local filesystem to target final file system
Answer : B
Explanation
The LOCAL clause only copies without moving the files.
Q 5 - The below expression in the where clause
RLIKE '.*(Chicago|Ontario).*';
gives the result which match
A - words containing both Chicago and Ontario
B - words containing either Chicago or Ontario
Answer : B
Explanation
Hive supports java based regular expression for querying.
Q 6 - The DISTRIBUTED by clause is used to ensure that
A - similar values go to the same reducer
B - similar values go to same mapper
C - similar values are distributed evenly across all the reducers
D - similar values are distributed evenly across all the mapers
Answer : A
Explanation
The DISTRIBUTED BY clause send a range of values to the same reducer.
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 default limit to the number of rows returned by a query can be done using which of the following parameter?
A - hive.limit.optimize.enable
B - hive.limit.enable.optimize
Answer : A
Explanation
This parameter is configured to change the default value of the number of rows returned
Q 9 - Which file controls the logging of commands put in CLI?
Answer : A
Explanation
This property controls the logging in command line Interface.
Q 10 - When one of the join tables is small enough to fit into memory, The type of join used by Hive is
Answer : B
Explanation
As one of the tables already fits into the memory each row of the big table is quickly compared with each row of small table using Map Join.