Hive Online Quiz


Advertisements

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

Q 1 - Each database created in hive is stored as

A - a directory

B - a file

C - a hdfs block

D - a jar file

Answer : A

Explanation

Each database becomes a directory and each table becomes a file in that directory

Answer : D

Explanation

As they are managed by Hive metadata, other applications cannot access it.

Q 4 - While querying a hive table for a column with MAP data type, the elements in the column are referenced by

A - Index

B - Key

C - Value

D - nested Index

Answer : B

Explanation

The MAP data type is a key-value pair and not index based.

Answer : B

Explanation

The explode() function expands each element of ARRAY into a row.

Answer : A

Explanation

The DISTRIBUTED BY clause send a range of values to the same reducer.

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?

A - Query A

B - Query B

C - Both

D - None

Answer : B

Explanation

in Query B, the query is executed only once.

Answer : C

Explanation

When files are not splitable , querying them becomes inefficient.

Q 9 - Which of the below is not a type compression option for Sequence file

A - RECORD

B - BLOCK

C - COLUMN

D - NONE

Answer : C

Explanation

There is no COLUMN compression type for a sequence file

Q 10 - The Hive metadata can be easily created and edited using

A - HCatalog

B - HMetamanager

C - Hweblog

D - Hue

Answer : A

Explanation

Hcatalog stores metadata information for many Hadoop tools like Hive and Mapreduce. It can be accessed through a web interface.

hive_questions_answers.htm
Advertisements