- 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 - 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 - 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 - To see the data types details of only a column (not the table) we should use the command
Answer : A
Q 4 - When the result of the STRING data type is returned by querying array data type using index, the result have
Answer : A
Explanation
The STRINGS returned form ARRAYS will not contain the quotes.
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 - A View in Hive can be dropped by using
Answer : B
Explanation
DROP view drops the view.
Q 7 - Consider the below two sets of queries.
Query A: hive> INSERT OVERWRITE TABLE sales SELECT * FROM history WHERE action = 'purchased'; hive> INSERT OVERWRITE TABLE credits SELECT * FROM history WHERE action = 'returned'; and Query B: hive> FROM history INSERT OVERWRITE sales SELECT * WHERE action = 'purchased' INSERT OVERWRITE credits SELECT * WHERE action = 'returned'
Which of them will make a single pass through?
Answer : B
Explanation
in Query B, the query is executed only once.
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 - A Table Generating Function is a 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 : C
Explanation
Examples functions is Explode()
Q 10 - The MACRO created in Hive has the ability to
A - Run multiple functions on same set of data automatically
Answer : B
Explanation
Macros are created for the purpose of calling other functiuons