![Hive Tutorial](/hive/images/hive-mini-logo.jpg)
- 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.
![Questions and Answers](/images/questions_and_answers.png)
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 - On dropping an external table
A - The schema gets dropped without dropping the data
Answer : A
Explanation
As the data is stored externally Hive only drops the schema.
Q 3 - The "strict" mode when querying a partitioned table is used to
A - stop queries of partitioned tables without a where clause
B - automatically add a where clause to the queries on a partitioned table
Answer : A
Explanation
The strict mode is designed to avoid long running jobs.
Q 4 - Creating a table an loading it with a select clause in one query applies to
Answer : A
Explanation
Only a internal table can be created and loaded with data using one query.
Q 5 - The clause used to limit the number of rows returned by a query is
Answer : A
Explanation
LIMIT restricts the number of rows returned by a query.
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 LIMIT clause applied to a select query
A - Executes the entire query before the LIMIT clause
B - Hive fetches one row at a time until it gets the required limit.
C - Creates a temporary file and stores the query result their
Answer : A
Explanation
The query is run on complete data set and then the results are restricted using LIMIT clause.
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 - Which file controls the logging of commands put in CLI?
Answer : A
Explanation
This property controls the logging in command line Interface.
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