- 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 - 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 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 - 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 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 - 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 - Intermediate compression in Hive is about
A - Compressing the data just before it is read by mapreduce task
B - Compressing the data just before it is output to the user
C - Compressing the data before it is stored by into the disk
D - Compressing the data shuffled between the map and reduce tasks
Answer : D
Explanation
Data compression between map and reduce task is called intermediate compression.
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 - A user creates a UDF which accepts arguments of different data types, each time it is run. It is an example of
Answer : B
Explanation
Generic functions are created as java programs and can accept variable data types.
To Continue Learning Please Login
Login with Google