- 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 - Each database created in hive is stored as
Answer : A
Explanation
Each database becomes a directory and each table becomes a file in that directory
Q 2 - By default when a database is dropped in Hive
A - the tables are also deleted
B - the directory is deleted if there are no tables
Answer : B
Explanation
Hive does not recursively delete the directory. So tables must be dropped first.
Q 3 - The partitioning of a table in Hive creates more
A - subdirectories under the database name
Answer : B
Explanation
Partitions of a table creates more subdirectories under it.
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 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 - The name of a view in Hive
A - can be same as the name of another table in the same database
B - cannot be same as the name of another table in the same database
Answer : B
Explanation
Views and tables are treated similarly in the hive metadata
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 - Hive can automatically decide to run local mode by setting which of the following parameters in hive-site.xml?
A - hive.exec.mode.local.enable
B - hive.exec.mode.cluster.disable
Answer : D
Explanation
This parameter is used to set local mode.
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 - Which of the following File Formats are supported by Hive?
Answer : D
Explanation
Hive supports all these three file formats as they are also supported by Hadoop in general