- 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 - The default delimiter in hive to separate the element in STRUCT is
Answer : B
Explanation
The four default delimiters are − \n for record separator,
001\ for field separator
002\ for element separator in ARRAY or STRUCT
003\ for element separator in MAP
Q 2 - If the database contains some tables then it can be forced to drop without dropping the tables by using the keyword
Answer : D
Explanation
CASCADE clause drops the table first before dropping the database
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 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 - 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 - If the data on the table on which an index is defined changes then,
B - The index rebuilds automatically
Answer : C
Explanation
Hive does not manage the Index like RDBMS. SO it has to be built manually.
Q 8 - If a hive query produces unexpected result then its cause can be investigated by using
Answer : B
Explanation
Virtual columns give the complete path and name of data block from where the error is arising.
Q 9 - The explode() function in hive takes an array of input and iterates through it returning each element as a separate row. This is an example of
Answer : C
Explanation
SELECT explode(array(1,2,3)) AS element FROM src;
gives 1 2 3 so it is table generating function
Q 10 - Calling a unix bash script inside a Hive Query is an example of
Answer : D
Explanation
In this type of streaming the code resides in the script being called and Hive is not aware of the code.
To Continue Learning Please Login
Login with Google